Registered Member
|
KDevelop (Version 4.6.0) automatically highlights all occurrences of text under the cursor. Is there any way to disable this?
I'm using custom theme so the default highlight color is jarring, I do not even seem to find how to change the highlight color. |
Registered Member
|
I use KDevelop 4.7.1 and KDE 4.14.5 (Kate with the same version).
I'm not sure if in your version of KDevelop such option is available, but you can try with
For me change selected here color made change "automatically highlights all occurrences of text under the cursor". So if you change this color to the background color of your KDevelop then highlighting seems to be disabled. |
Registered Member
|
[quote="piotrm"]I use KDevelop 4.7.1 and KDE 4.14.5 (Kate with the same version).
At least in 4.6 that setting only changes the highlight color of occurrences when you double click on a text (on C++ source file). This does not affect the hover highlighting or when you move the cursor on the text when editing source. |
Registered Member
|
Yes you are right. My mistake . In my version it works the same like you write.
But I found properly option which disable refers to highlighting when mouse cursor hovering the word. In my version this is placed in
Anyway. If I turned off this extension then when I move cursor on the text, it isn't highlighted. |
Registered Member
|
Sorry. Again my mistake . Above option refers to
Previously I not conducted sufficient tests . Finally in my version there is no option to disable such highlighting as you mentioned. At least I can't find it. |
Registered Member
|
This really seems to be the case.
Annoying little feature, I guess I'll have to see if I get used to it |
Registered Member
|
this issue has been annoying me as well, i just wanted to tell you i found it comes from the code browser plugin, will update if i find a way to disable the highlighting without disabling code browser completely
|
Global Moderator
|
I don't think you can disable the highlight, sorry
But configurable colors for all this is a feature request standing for years ...
I'm working on the KDevelop IDE.
|
Registered Member
|
Well, I'll try to give you some more informations: I think the highlighting feature is located in the context browser plugin. But it's not really a "plugin": It's the central class for viewing the contents of the opened documents.
Especially you can see in the two functions
that the colors are hardcoded here. That means you can't change them after compiling. Why is it done this way, when you can change nearly any other color in the settings? Because the colors in the settings are provided by KatePart/KTextEditor, while the mouse hover highlight functionality is some sort of KDevelop's own thing. That's why you can't change it in the settings dialog under Fonts & Colors. You have two options: Integrate hl functionality on mouse hover in KatePart (difficult and maybe not doable). Implement a switch to deactivate highlighting in KDevelop. It's an uglier solution, but should work without problems. It seems to me the whole updateViews() method only does highlighting. So try deactivating it (setting off the QTimer) and see what happens. |
Global Moderator
|
Thanks for finding the place where it's hardcoded, I just wanted to go search for it in the next few days
I think we should just use kate's search highlight color, if we can get that.
I'm working on the KDevelop IDE.
|
Global Moderator
|
Fix is in, will be in 5.0.1. It now uses the "search highlight" color from kate as background.
I'm working on the KDevelop IDE.
|
Registered Member
|
Yea, great idea to just use Kate's highlighting color value! But will it then look completely the same? I think a little difference between the two highlighting methods would be nice. Is it maybe possible to always add a small delta to the color code you get from Kate? Just to make it a small nuance brighter/darker? |
Global Moderator
|
Hm yeah, but then you are back again at the situation from before where the user can't really control what it looks like. Also color calculations always have the risk of turning out hard to read ...
Are you sure it's a problem the two look the same? I clicked around a bit and it seemed fine to me. If it turns out to be a problem we can certainly figure something out.
I'm working on the KDevelop IDE.
|
Registered Member
|
The issue I see is with text highlighting in power search (CTRL+R). When you search for a pattern (click Find All) it highlights all occurrences. Then clicking on document and moving your mouse over another word in the text highlights this in the same color. A (small) differentation would be nice in this case (I indeed use the two features sometimes together).
I don't know how the color values are calculated. But if for example there is the possibilty of increasing the brightness without changing the hue wrt the normal search highlighting it could work quite well I believe. Also for users with crazy color template choices. |
Global Moderator
|
I have done a lot of color calculations in the past, and it's always ... difficult to get it right. Esp. for white and black it's very different how much you have to modify a color in order to get a noticeable difference, and it also depends on screen gamma, etc ... I'd rather not do that here.
I think it would then be better to introduce an additional "Default Text Style" in kate to be used for that purpose.
I'm working on the KDevelop IDE.
|
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]