Sublime Forum

select_to_mark doesn't work in the second panel

#1

Here is what I have:

[code]class always_select_mark(sublime_plugin.EventListener):
global marks
def init(self, *args, **kwargs):
sublime_plugin.EventListener.init(self, *args, **kwargs)

def on_selection_modified(self, view):
view.run_command(‘select_to_mark’)
[/code]

The idea is that once I set mark, everytime I move a cursor the editor will select texts that sit between the mark and the current cursor position.

This works well for the first panel. However, when I create a second panel using View -> Layout -> Columns:2 and then set a mark in it, the above doesn’t function.

Can you please help me correct the function above? Thank you for your help.

0 Likes