This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 187627

Summary: Mark occurrences persists after moving cursor away
Product: editor Reporter: chris4beta <chris4beta>
Component: Actions/Menu/ToolbarAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description chris4beta 2010-06-16 02:26:09 UTC
Using NB 6.9 PHP:

When mark occurrences is turned on, instances remain highlighted after I've moved my cursor away from the variable. There is no way to remove the highlighting, even moving cursor to white space does not clear it.

In 6.8, after moving away from the variable the highlighting was cleared.
Comment 1 rmatous 2010-06-17 10:04:26 UTC
behaves the same way as in java support now, but its true it was changed since 6.8.
Comment 2 chris4beta 2010-06-22 20:14:17 UTC
So it's one of those, "It's not a bug, it's a feature!" sort of things? Is this now the intended behavior for mark occurrences?
Comment 3 chris4beta 2010-06-22 23:00:44 UTC
I went back to 6.8 after seeing this, because I thought it would get on my nerves, but really isn't so bad. Is there a keyboard shortcut so I can quickly toggle 'mark occurrences' for when the highlighting is annoying?
Comment 4 rmatous 2010-06-23 07:36:04 UTC
I remember someone complained also about old (6.8) mark occurrences behavior, so 1:1 seems to be the score now :). Not everyone seems to be happy anytime. On the other hand I'm open to revert the behavior back based on the feedback.

one of those? what else? I simply can hardly believe that this issue is good reason to return back, so probably more then that, could you comment, thanks
Comment 5 chris4beta 2010-06-24 03:35:15 UTC
The more I use it, I like the new functionality. However, I think there needs to be a keyboard shortcut to clear the highlighting, just as Alt+Shift+H clears highlight search.

On one hand, it is very useful for the occurrences to stay highlighted as I move throughout the page. But, sometimes I don't want it to constantly be highlighting every variable I type. I vote for a keyboard shortcut to toggle the mark occurrences option.
Comment 6 IgalR 2010-06-24 06:21:11 UTC
When first time I saw the "feature" I thought - it's annoying, but I agree with chris4beta that it might be very useful. So I vote for the shortcut too, to clear highlighted results.

Is it possible to prepare kind of patch, adding this functionality, before the next official release will be prepared?
Comment 7 chris4beta 2010-06-25 22:52:35 UTC
After using it more, I've come to decide the new functionality does more harm than good until there is a keyboard shortcut to quickly toggle it on/off.

This is what often happens for me... as I'm browsing through my code, I'll happen to click on '$this->' which is all over the place, and the highlighting becomes obnoxious. Since simply moving the cursor to whitespace no longer clears it, I have to look around for a less-obtrusive variable to click on so the highlighting isn't so distracting.

In my opinion, either change behavior back to 6.8 style, or add a keyboard shortcut to quickly kill it when it gets too annoying, because we've now lost the 'kill switch' of just moving the cursor away from the variable.
Comment 8 paolosca 2010-06-29 07:57:57 UTC
I like the new way it works, it's very useful to be able to do other actions like copy and paste without losing the hi-light. The keyboard shortcut to toggle it would be useful.
Comment 9 tabascoterrier 2010-08-07 17:15:56 UTC
+1 for being able to clear the marked occurrences.  

While the persistence can be useful in some circumstances, it can be an annoyance in others, and so the user should have control of this behaviour.
Comment 10 chris4beta 2010-08-18 20:36:15 UTC
@rmatous - what are your thoughts on adding a keyboard shortcut to enable/disable?
Comment 11 Filip Zamboj 2010-09-15 12:31:49 UTC
batch reassigning
Comment 12 eugenedw 2010-11-06 14:29:55 UTC
+1 to have a shortcut key to remove highlighting - when using certain color schemes, this can be very annoying
Comment 13 t.fiersen 2011-01-30 15:22:09 UTC
I think it would be nice if it would behave like in Notepad++, double click on whatever you want and it will highlight all occourences of the clicked token (including strings and stuff!), clicking again (no matter where) causes the highlight to be removed.

Simple, straight forward, comfortable.
Comment 14 chris4beta 2011-03-17 00:27:24 UTC
Any thoughts on this? Can we please get a keyboard shortcut to clear the highlighted items? Or else an option to disable persistence when you move the cursor away (like NB 6.8 functionality)?
Comment 15 Tomas Mysik 2011-06-08 14:57:41 UTC
Batch reassigning.
Comment 16 dziastinux 2011-06-12 18:30:43 UTC
+1 for keyboard shortcut.
Still no shortcut exists in 7.0.1.
Comment 17 everflux 2011-07-13 15:18:33 UTC
Please create a shortcut to clear the highlight. It even persists in the Java editor (which is good as long as it can be reset), this is nothing specific to PHP.
Comment 18 Jiri Prox 2011-07-13 16:49:42 UTC
In java support the behavior can be changed in options dialog - by default marks are persistent, but it can be set to hide marks when cursor moves away from the identifier.
Comment 19 riotrick 2011-08-03 14:47:02 UTC
+1 for keyboard shortcut.
The mark occurences functionality is extremely useful. It's just a pain you can't clear it when you want to.
Comment 20 polygone 2011-08-18 15:14:40 UTC
I'd like to see the marked occurrences disappear, when you click away from a symbol.  I have to keep clicking on some symbol that is not used as often.  This is annoying.  A good amount of people seem to like this 'feature', but I think maybe we can meet in the middle and make persistence an option in settings.
Comment 21 Jiri Prox 2011-08-19 05:23:46 UTC
to polygone@netbeans.org:
see my previous post, mark occurrences can by set up do hide when cursor moves out of the symbol. See Tools -> Options -> Editor -> Occurrences settings
Comment 22 Mr_and_Mrs_D 2011-12-29 20:02:20 UTC
+1 to have a shortcut key to remove highlighting
Tools -> Options -> Editor -> Occurrences settings is blank in C\C++ apart from an *empty* listbox named "Languages"
Comment 23 Mr_and_Mrs_D 2011-12-29 20:07:04 UTC
Please mark as enhancement and move to component : editor - it is not java specific - and platform: All (I am on Ubuntu 11.10)
Comment 24 Martin Balin 2016-07-07 07:28:52 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss