SF.net SVN: geany: [368] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Fri May 26 17:11:48 UTC 2006


Revision: 368
Author:   ntrel
Date:     2006-05-26 10:11:41 -0700 (Fri, 26 May 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=368&view=rev

Log Message:
-----------
Fix incremental find and replace of back to back matches

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-05-26 17:03:32 UTC (rev 367)
+++ trunk/ChangeLog	2006-05-26 17:11:41 UTC (rev 368)
@@ -4,6 +4,8 @@
    Fixed nasty hang when closing a tab and both the next tab and the
    first tab files have been externally modified.
  * src/dialogs.c: Add mnemonics to Replace dialog buttons, reorder.
+ * src/document.c: Fix incremental find and replace of back to back
+                   matches.
 
 
 2006-05-25  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-05-26 17:03:32 UTC (rev 367)
+++ trunk/src/document.c	2006-05-26 17:11:41 UTC (rev 368)
@@ -671,7 +671,7 @@
 	selection_end =  sci_get_selection_end(doc_list[idx].sci);
 	if (!inc && sci_can_copy(doc_list[idx].sci))
 	{ // there's a selection so go to the end
-		sci_goto_pos(doc_list[idx].sci, selection_end + 1, TRUE);
+		sci_goto_pos(doc_list[idx].sci, selection_end, TRUE);
 	}
 
 	sci_set_search_anchor(doc_list[idx].sci);
@@ -711,9 +711,9 @@
 	if ((selection_end - selection_start) > 0)
 	{ // there's a selection so go to the end
 		if (search_backwards)
-			sci_goto_pos(doc_list[idx].sci, selection_start - 1, TRUE);
+			sci_goto_pos(doc_list[idx].sci, selection_start, TRUE);
 		else
-			sci_goto_pos(doc_list[idx].sci, selection_end + 1, TRUE);
+			sci_goto_pos(doc_list[idx].sci, selection_end, TRUE);
 	}
 
 	sci_set_search_anchor(doc_list[idx].sci);
@@ -749,9 +749,9 @@
 	if ((selection_end - selection_start) > 0)
 	{ // there's a selection so go to the end
 		if (search_backwards)
-			sci_goto_pos(doc_list[idx].sci, selection_start - 1, TRUE);
+			sci_goto_pos(doc_list[idx].sci, selection_start, TRUE);
 		else
-			sci_goto_pos(doc_list[idx].sci, selection_end + 1, TRUE);
+			sci_goto_pos(doc_list[idx].sci, selection_end, TRUE);
 	}
 
 	sci_set_search_anchor(doc_list[idx].sci);


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