Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Move Occurrence highlighting from core into a plugin
Jenna:
--- Quote from: jens on July 31, 2013, 03:04:01 am ---There is one issue with permanently highlighting.
The highlighting will occurr (most of the times) first after clicking into the file (if it is already opened and not the active one).
It's the same when permanently highlighting is turned off for a word: in actual file highlighting is removed immediately, in open files it is removed after clicking into the file at any place.
I can look into it tomorrow, if you want.
--- End quote ---
This patch fixes it for me on linux.
I did not (yet) test the whole stuff on windows, so it might be a (wx)scintilla on linux/gtk issue only.
--- Code: ---Index: src/plugins/occurrenceshighlighting/highlighter.cpp
===================================================================
--- src/plugins/occurrenceshighlighting/highlighter.cpp
+++ src/plugins/occurrenceshighlighting/highlighter.cpp
@@ -33,7 +33,8 @@
if ( Manager::Get()->GetEditorManager()->GetActiveEditor() != ctrl ) return;
// check the event type if it is an update event
- if ( event.GetEventType() == wxEVT_SCI_UPDATEUI )
+ if ( event.GetEventType() == wxEVT_SCI_UPDATEUI ||
+ event.GetEventType() == wxEVT_SCI_PAINTED)
{
HighlightOccurrencesOfSelection(ctrl);
OnEditorUpdateUI(ctrl);
--- End code ---
MortenMacFly:
--- Quote from: jens on July 31, 2013, 03:04:01 am ---Next updated patch.
--- End quote ---
This one applies safely for me. I believe it covers 2+3?
Jenna:
--- Quote from: MortenMacFly on August 01, 2013, 09:04:46 am ---
--- Quote from: jens on July 31, 2013, 03:04:01 am ---Next updated patch.
--- End quote ---
This one applies safely for me. I believe it covers 2+3?
--- End quote ---
Yes, it does.
Jenna:
Any comments, issues or whatever ?
I personally think it should be committed to trunk, if everything works as expected.
MortenMacFly:
--- Quote from: jens on August 06, 2013, 10:31:56 pm ---Any comments, issues or whatever ?
--- End quote ---
Go ahead - works fine for me since day 1 posted here.
Navigation
[0] Message Index
[*] Previous page
Go to full version