SF.net SVN: geany:[3229] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sat Nov 15 15:52:37 UTC 2008
Revision: 3229
http://geany.svn.sourceforge.net/geany/?rev=3229&view=rev
Author: eht16
Date: 2008-11-15 15:52:36 +0000 (Sat, 15 Nov 2008)
Log Message:
-----------
Fix wrong highlighting of search results when using 'Mark' in the Find dialog.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-14 18:02:28 UTC (rev 3228)
+++ trunk/ChangeLog 2008-11-15 15:52:36 UTC (rev 3229)
@@ -1,3 +1,10 @@
+2008-11-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/search.c:
+ Fix wrong highlighting of search results when using 'Mark' in
+ the Find dialog.
+
+
2008-11-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/main.c:
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2008-11-14 18:02:28 UTC (rev 3228)
+++ trunk/src/search.c 2008-11-15 15:52:36 UTC (rev 3229)
@@ -840,11 +840,14 @@
static gint search_mark(GeanyDocument *doc, const gchar *search_text, gint flags)
{
- gint pos, end_pos, count = 0;
+ gint pos, count = 0;
+ gsize len;
struct TextToFind ttf;
g_return_val_if_fail(doc != NULL, 0);
+ len = strlen(search_text);
+
ttf.chrg.cpMin = 0;
ttf.chrg.cpMax = sci_get_length(doc->editor->sci);
ttf.lpstrText = (gchar *)search_text;
@@ -853,8 +856,7 @@
pos = sci_find_text(doc->editor->sci, flags, &ttf);
if (pos == -1) break;
- end_pos = scintilla_send_message(doc->editor->sci, SCI_WORDENDPOSITION, pos, TRUE);
- editor_set_indicator_full(doc->editor, GEANY_INDICATOR_SEARCH, pos, end_pos);
+ editor_set_indicator_full(doc->editor, GEANY_INDICATOR_SEARCH, pos, pos + len);
ttf.chrg.cpMin = ttf.chrgText.cpMax + 1;
count++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list