Home Download Buy Blog Forum Support

Dev Build 2132

Re: Dev Build 2132

Postby tito on Sun Oct 16, 2011 4:28 pm

Running thanks
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: Dev Build 2132

Postby weslly on Sun Oct 16, 2011 9:53 pm

DSHugo wrote:
tito wrote:Sometimes I want to select some text by normal dragging and sublime start crazy one line below and also it select more portions of other lines. I was not paying attention and I can't see a way to reproduce this. This happens with these two dev builds.
Anyone seeing this?


Definitely seeing this too occasionally. Are you, by any chance, using WordHighlight plugin? I'm not 100% sure yet, but it seems that selection glitching at least happens more often with it installed, both under Linux and Windows XP. The worst part is that I can't reproduce it properly, though.

What I can definitely say, is that when it happens, selecting text with mouse starts selection one line below of where it should actually be, and if done towards the end of the file, selection ends at the last symbol regardless of where the mouse is.


I think the problem is with "scroll_past_end" option, I just had the same issue after I set it to false in my user file settings...

EDIT: I tried to reproduce it and apparently it happens when you have scroll_past_end option set to false, then you fold something in the last lines of your code and try to select anything near those lines.

EDIT 2: The problem is with pyparadigm's tagmatcher plugin
weslly
 
Posts: 202
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: Dev Build 2132

Postby facelessuser on Mon Oct 17, 2011 12:16 am

weslly wrote:
DSHugo wrote:
tito wrote:Sometimes I want to select some text by normal dragging and sublime start crazy one line below and also it select more portions of other lines. I was not paying attention and I can't see a way to reproduce this. This happens with these two dev builds.
Anyone seeing this?


Definitely seeing this too occasionally. Are you, by any chance, using WordHighlight plugin? I'm not 100% sure yet, but it seems that selection glitching at least happens more often with it installed, both under Linux and Windows XP. The worst part is that I can't reproduce it properly, though.

What I can definitely say, is that when it happens, selecting text with mouse starts selection one line below of where it should actually be, and if done towards the end of the file, selection ends at the last symbol regardless of where the mouse is.


I think the problem is with "scroll_past_end" option, I just had the same issue after I set it to false in my user file settings...

EDIT: I tried to reproduce it and apparently it happens when you have scroll_past_end option set to false, then you fold something in the last lines of your code and try to select anything near those lines.

EDIT 2: The problem is with pyparadigm's tagmatcher plugin


This might be because SublimeTagmatcher searches on every change of the selection. If it has to search real far, it can cause some stuttering on selection especially with the rapid changing of selection due to the drag select etc.

I had created a fork to fix things like this myself, but also added a lot of other things. You can check out my BracketHighlighter plugin which merged SublimeBracket and SublimeTagmatcher. I debounced the highlighting to cut down on how many times the highlighting was occuring. I also placed limits to keep it from bogging down things. It is all configurable as well in case you don't like the response of things and has additional features. If you end up trying the plugin but still see issues, you can create an issue on the git site and I can look into the issue, otherwise, I would create an issue on pyparadigm's plugin site and try to work with him to get it fixed.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Dev Build 2132

Postby tito on Mon Oct 17, 2011 2:21 am

Nice catch ! I've scroll_past_end set to false, it happen too with WordHighlight.
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: Dev Build 2132

Postby facelessuser on Mon Oct 17, 2011 3:28 am

Yeah, disabling WordHighlight gets rid of the issue for me as well.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Dev Build 2132

Postby DSHugo on Mon Oct 17, 2011 5:25 am

There will be an update for WordHighlight today, roughly after 12 hours. When it comes, would somebody of you guys who have it already installed and have selection glitch, give the feedback if the update helped (e.g. here or using the issue tracker)? I will be testing it myself anyway, but having other users feedback helps a lot.
Last edited by DSHugo on Mon Oct 17, 2011 4:21 pm, edited 1 time in total.
DSHugo
 
Posts: 42
Joined: Tue Sep 20, 2011 11:05 am

Re: Dev Build 2132

Postby jps on Mon Oct 17, 2011 6:13 am

atomi wrote:It may be much more usable if there was a single keyboard shortcut for only toggling code folding.
This way it wont be necessary to have folding markers in the gutter to fold code.

A single key binding to toggle folding doesn't provide an easy way to fold the current function if the caret isn't currently at the top level of indentation. The current bindings are designed so that you can keep pressing the fold key until you've folded to the level you're happy with. There is a fold_unfold command (in fold.py) if you'd like a binding to toggle folding.

I don't see that having one binding instead of two would have any influence over the gutter fold buttons: they simply provide a way to fold using the mouse.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 2132

Postby jps on Mon Oct 17, 2011 6:15 am

tito wrote:Then, once you finish, what you want there is "refold".. a manually "refold" takes a lot of time.

This somewhat exists: if you unfold using a key binding, the unfolded text will be selected. Pressing fold again without changing the selection will refold the selected text.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 2132

Postby alexrussell on Mon Oct 17, 2011 9:33 am

facelessuser wrote:Yeah, disabling WordHighlight gets rid of the issue for me as well.

Didn't know which of the posts to reply to regarding this but just to confirm that this also happens for me with WordHighlighter enabled, and doesn't happen with it disabled.

For those wanting to reproduce it's quite simple. First off it appears that scroll_past_end needs to be false, and WordHighlighter need to be installed and not disabled. But the actual bug occurs when you have a file that goes over the height of the window (thus invoking scrolling), and if you are scrolled all the way to the bottom and then delete lines. (Actually you could also be not scrolled quite to the bottom, but delete a number of lines that is greater than the number of lines left off-page.) Then, until you next scroll, the bug happens. Upon scrolling, the layout appears to reset itself.

So this could be a bug not in WordHighlight specifically but it could be that the WH plugin is exposing an underlying bug in the view/scrolling code. (Or yeah it could just be WH.)

This definitely only started for me a couple of dev releases ago. I've been meaning to bring it up but keep forgetting to.



There's also a long standing bug of the minimap not being updated for code folding until there's some kind of repaint (scroll action, of focus goes out of Sublime window, for example). This is not a biggie as you can just scroll and it updates, but just worth mentioning.
alexrussell
 
Posts: 74
Joined: Fri Jul 15, 2011 9:06 am

Re: Dev Build 2132

Postby DSHugo on Mon Oct 17, 2011 9:59 am

alexrussell wrote:For those wanting to reproduce it's quite simple. ...

Thank you, it helped a great deal. At least I can now confirm this part of the bug has something to do with WordHighlight calling `view.add_regions`. It seems that having:
Code: Select all
class WordHighlightListener(sublime_plugin.EventListener):
    def on_selection_modified(self,view):
         ...
         view.add_regions("WordHighlight", regions, "comment", false) <= "problem"

Having the "problem" line called more than once in a row (roughly 0.1 sec for me) causes the bug (e.g. clicking once causes `selection changed` event to fire twice). Maybe it is because an "on_selection_modified" event is invoked too frequently for the previous run of code to complete and exit, or whatever.

There is, as already mentioned, a second part of the bug, however. The one when selection starts on the line below the pointer -- right where it should be, but one line below. I can't reproduce this with the method, suggested by alexrussell.
DSHugo
 
Posts: 42
Joined: Tue Sep 20, 2011 11:05 am

PreviousNext

Return to General Discussion

Who is online

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