Home Download Buy Blog Forum Support

Folding lost on focus

Folding lost on focus

Postby fciliberti on Tue Mar 13, 2012 12:36 pm

Hi there. Sometimes when I lost focus from sublime text 2 to another window and go back I loose cursor position and any folded section. Its seems like a "refresh". Is very strange.

Runing SublimeText 2 on Ubuntu 11.10.

Thanks and sorry about my poor english.
fciliberti
 
Posts: 2
Joined: Tue Mar 13, 2012 12:22 pm

Re: Folding lost on focus

Postby tito on Tue Mar 13, 2012 4:47 pm

That's probably because you modified the document with an external application. The file is reloaded and the fold is lost.
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Folding lost on focus

Postby fciliberti on Thu Jun 07, 2012 1:16 am

Nop. Nothing like that. But I think its because the file is in a samba share. Is absolutely annoying. Specially when working with larges files and debugging code. Please help.
fciliberti
 
Posts: 2
Joined: Tue Mar 13, 2012 12:22 pm

Re: Folding lost on focus

Postby tito on Thu Jun 07, 2012 3:43 am

https://github.com/SublimeText/BufferScroll

The plugin was designed to try to keep every scroll, bookmarks, marks, folds, cursors and everything between sessions.

Unfortunately sublime text does not send "on_reload" event which prevents this plugin for restoring precious data.

Fortunately this plugin adds a new command called "refold", which will restore the folding of the previous fold command. ( if the previous fold was saved at least one time )

Unfortunately sublime text yet again does not send some vital events (on_application_close, on_project_close, on_project_open, on_viewport_change , on_viewport_extent_change, on_... ) to keep this plugin functioning smoothly.

There is also a bug in the API ( set_viewport_position) which prevents this plugin from restoring scroll of xml/html documents, including: xml, tpl, html, xhtml, etc
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 22 guests