
+1
Scrolling doesn't update selection
This is also posted in the forums: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=5471
The code is easy enough to test. Open a new file. Open the python console and type:
>>> edit = view.begin_edit('test')>>> view.insert(edit, 0, ("abcd"*12+"\n")*100)>>> view.end_edit(edit)>>> region = sublime.Region(4851, 4899)>>> view.sel().clear()>>> view.show_at_center(region)>>> view.sel().add(region)
At this point, the text should be highlighted, but it is not. Compare with what happens when we add one more line:
>>> view.show_at_center(sublime.Region(4900, 4900))
Voilà, the selection is highlighted.
I noticed this happening when using plugins that highlight and scroll. In my case, I'm using the SimpleMovements plugin to highlight multiple lines. If my view doesn't scroll, the line is not highlighted, which looks like my plugin isn't working!
Customer support service by UserEcho
Replies 2