Home Download Buy Blog Forum Support

change layout on view close

change layout on view close

Postby uboness on Wed Jan 09, 2013 1:40 pm


I'm trying to write a plugin that changes the layout when the last tab in a group is closed, but when trying to call the set_layout command in the on_close method, sublime crashes. Any pointers on how I should go about it?

Posts: 1
Joined: Wed Jan 09, 2013 1:37 pm

Re: change layout on view close

Postby adzenith on Wed Jan 09, 2013 5:15 pm

Have you tried using sublime.set_timeout with a callback that changes the layout? Try for maybe 400 ms to start, and keep in mind that it's a weird race condition thing and if you have a fast computer it could crash on other people's.
Not that I had a bad experience crashing Sublime while trying to change the layout or anything...
Posts: 1403
Joined: Mon Oct 19, 2009 9:12 pm

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 5 guests