Home Download Buy Blog Forum Support

BufferScroll

Re: BufferScroll

Postby tito on Tue Jan 07, 2014 8:06 am

Done :-)
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: BufferScroll

Postby Binocular222 on Tue Jan 07, 2014 1:46 pm

Whao, that's so fast, thank you.
window.run_command("buffer_scroll_fold_select_folded")
window.run_command("buffer_scroll_fold_select_unfolded")
Binocular222
 
Posts: 55
Joined: Sat May 18, 2013 4:10 pm

Re: BufferScroll

Postby Binocular222 on Tue Jan 07, 2014 4:48 pm

I suggest changing BufferScrollFoldSelectUnfolded to:
Code: Select all
class BufferScrollFoldSelectUnfolded(sublime_plugin.TextCommand):
    def run(self, view):
        folds = [[item.a, item.b] for item in self.view.folded_regions()]
        if folds:
            self.view.sel().clear()
            prev = 0
            for fold in folds:
                # sublime.message_dialog(self.view.substr(fold[0]))
                self.view.sel().add(sublime.Region(prev, int(fold[0])))
                if self.view.substr(fold[1]) == "\n":
                    prev = int(fold[1]) + 1
                else:
                    prev = int(fold[1])
            self.view.sel().add(sublime.Region(prev, self.view.size()))
Binocular222
 
Posts: 55
Joined: Sat May 18, 2013 4:10 pm

Re: BufferScroll

Postby tito on Tue Jan 07, 2014 5:39 pm

Done, thanks :) Didn't test it :P
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: BufferScroll

Postby Kuroi on Tue Mar 18, 2014 5:17 am

Is ST2 no longer supported for this plugin?
Kuroi
 
Posts: 1
Joined: Tue Mar 18, 2014 5:16 am

Re: BufferScroll

Postby tito on Tue Mar 18, 2014 12:33 pm

Nope, if possible consider upgrading, not only it works better and faster, you will also support work invested into new versions. Unless there is one of the few bug that may affect your setup, just upgrade.
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: BufferScroll

Postby tito on Sun Jun 01, 2014 8:34 pm

I made some updates, and recovered some lost functionality. In theory it should restore scroll and selections in all the situations.. did I broke something!?
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

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 12 guests