Skip to content

Commit b73c247

Browse files
committed
Fix viewport scrolling flakiness with good old set_timeout(... , 0)
Fixes #61
1 parent 5b0a473 commit b73c247

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/blame_all.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ def run(self, edit):
8080
self.view.settings().set(VIEW_SETTING_PHANTOM_ALL_DISPLAYED, True)
8181
self.store_rulers()
8282
# Bring the phantoms into view without the user needing to manually scroll left.
83-
# @todo BlameAll: Automatically scrolling the view to the left doesn't work when the ST window has >1 Group
84-
self.view.set_viewport_position((0.0, self.view.viewport_position()[1]))
83+
sublime.set_timeout(
84+
lambda: self.view.set_viewport_position(
85+
(0.0, self.view.viewport_position()[1])
86+
),
87+
0,
88+
)
8589

8690
def extra_cli_args(self, **kwargs):
8791
return []

0 commit comments

Comments
 (0)