Home Download Buy Blog Forum Support

select_to_mark doesn't work in the second panel

select_to_mark doesn't work in the second panel

Postby imsangha on Fri Sep 27, 2013 6:23 pm

Here is what I have:

Code: Select all
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')


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.
imsangha
 
Posts: 3
Joined: Fri Sep 27, 2013 6:09 pm

Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests