+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!
0
colinta 13 year бұрын
I've got a very hacky, temporary solution:
UG.
0
Максим Зубков 11 year бұрын
This is still not fixed today :) Your workaround seem to not work for me either (view is not actually scrolled) so I did this instead: https://github.com/code-orchestra/colt-sublime-plugin/commit/9e6ffbf573fc60b356665ff2ba9ced614c71120f Spread the word!
Customer support service by UserEcho