Home Download Buy Blog Forum Support

getting switch_file.py to open in same group

getting switch_file.py to open in same group

Postby pushxtonotdie on Wed Oct 10, 2012 9:43 pm

Currently triggering switch_file.py will always open in the first group, not the group that is currently active. I'm attempting to decypher how to get the file to open in the current group (and if its already open in a different group, maybe to move it over).

Modifying the following at the end has the intended effect...but sometimes it still opens the file in the first group *and* the active group.

Code: Select all
groupIndex = self.window.active_group();
view = self.window.open_file(new_path)
self.window.set_view_index(view, groupIndex, 0)


Any ideas how this could be improved?

Also, I would consider this a feature improvement for trunk. :)
pushxtonotdie
 
Posts: 15
Joined: Tue Dec 20, 2011 8:44 pm

Return to Plugin Development

Who is online

Users browsing this forum: kinokasai, mattst and 5 guests