SF.net SVN: geany: [1243] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Sat Feb 3 13:14:34 UTC 2007


Revision: 1243
          http://svn.sourceforge.net/geany/?rev=1243&view=rev
Author:   ntrel
Date:     2007-02-03 05:14:34 -0800 (Sat, 03 Feb 2007)

Log Message:
-----------
Prevent scroll bar from moving when using document_find_text() and
no match is found.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-02-01 17:07:52 UTC (rev 1242)
+++ trunk/ChangeLog	2007-02-03 13:14:34 UTC (rev 1243)
@@ -1,3 +1,10 @@
+2007-02-03  Nick Treleaven  <nick.treleaven at btinternet.com>
+
+ * src/document.c:
+   Prevent scroll bar from moving when using document_find_text() and
+   no match is found.
+
+
 2007-02-01  Nick Treleaven  <nick.treleaven at btinternet.com>
 
  * src/ui_utils.c:

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2007-02-01 17:07:52 UTC (rev 1242)
+++ trunk/src/document.c	2007-02-03 13:14:34 UTC (rev 1243)
@@ -1123,15 +1123,11 @@
 		{
 			gint ret;
 
-			sci_goto_pos(doc_list[idx].sci, (search_backwards) ? sci_len : 0, TRUE);
+			sci_set_current_position(doc_list[idx].sci, (search_backwards) ? sci_len : 0, FALSE);
 			ret = document_find_text(idx, text, flags, search_backwards, scroll);
 			if (ret == -1)
 			{	// return to original cursor position if not found
-				gint new_visible_line;
-
-				sci_goto_pos(doc_list[idx].sci, selection_start, FALSE);
-				new_visible_line = sci_get_first_visible_line(doc_list[idx].sci);
-				sci_scroll_lines(doc_list[idx].sci, first_visible_line - new_visible_line);
+				sci_set_current_position(doc_list[idx].sci, selection_start, FALSE);
 			}
 			return ret;
 		}


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