SF.net SVN: geany: [1490] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Apr 30 12:24:41 UTC 2007


Revision: 1490
          http://svn.sourceforge.net/geany/?rev=1490&view=rev
Author:   ntrel
Date:     2007-04-30 05:24:40 -0700 (Mon, 30 Apr 2007)

Log Message:
-----------
Make replace all commands report no matches for read-only documents.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-04-30 12:17:31 UTC (rev 1489)
+++ trunk/ChangeLog	2007-04-30 12:24:40 UTC (rev 1490)
@@ -7,6 +7,8 @@
    Allow replacing identical text if case sensitive is not checked.
  * src/document.c:
    Fix reloading of read-only documents.
+ * src/document.c:
+   Make replace all commands report no matches for read-only documents.
 
 
 2007-04-29  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2007-04-30 12:17:31 UTC (rev 1489)
+++ trunk/src/document.c	2007-04-30 12:24:40 UTC (rev 1490)
@@ -1291,7 +1291,7 @@
 	if (new_range_end != NULL)
 		*new_range_end = -1;
 	g_return_val_if_fail(find_text != NULL && replace_text != NULL, 0);
-	if (idx == -1 || ! *find_text) return 0;
+	if (idx == -1 || ! *find_text || doc_list[idx].readonly) return 0;
 
 	sci_start_undo_action(doc_list[idx].sci);
 	ttf.chrg.cpMin = start;


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