diff --git a/ChangeLog b/ChangeLog index 833d48d8..69f833ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/document.c b/src/document.c index f2b91653..7c51dc44 100644 --- a/src/document.c +++ b/src/document.c @@ -1291,7 +1291,7 @@ document_replace_range(gint idx, const gchar *find_text, const gchar *replace_te 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;