Good work, I did not test the patch, just quick read the patch file:
Index: src/plugins/occurrenceshighlighting/highlighter.cpp
===================================================================
--- src/plugins/occurrenceshighlighting/highlighter.cpp (revision 0)
+++ src/plugins/occurrenceshighlighting/highlighter.cpp (working copy)
@@ -0,0 +1,356 @@
+#include "Highlighter.h"
+
+#include <sdk.h> // Code::Blocks SDK
+//#include <editorcolourset.h>
+#include <cbstyledtextctrl.h>
+#include <cbcolourmanager.h>
Is it better to put sdk.h as the first include files?
+#ifndef Highlighter_h
+#define Highlighter_h
and
+#ifndef OCCURRENCESHIGHLIGHTING_H_INCLUDED
+#define OCCURRENCESHIGHLIGHTING_H_INCLUDED
I would suggest to use a uniform string. like XXXXX_H
...(I assume its GIT based again)...
It is not in git format, looks like a valid svn patch.
commit 76a459e2d6c0f8d420ac4bf20807abb73e02052e
Author: Jens Lody <jens@codeblocks.org>
Date: Tue Jul 30 01:50:04 2013 +0200
* additional patch for move of occurrences highlighting
Index: acinclude.m4
===================================================================
--- acinclude.m4
+++ acinclude.m4
@@ -170,6 +170,17 @@
AC_MSG_RESULT(no)
Look at the first line, it should be a git patch, Jens may use some utility tool to translate this patch a little to make it svn compatible.
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.
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.
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);