From: Chris Allegretta Date: Sun, 22 Apr 2001 07:10:05 +0000 (+0000) Subject: Add and fix bug #59 X-Git-Tag: v1.0.2~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=da9faf27723d61482b4ba881d745d438dd238f0a;p=nano.git Add and fix bug #59 git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/BUGS b/BUGS index 578854a5..4f3acded 100644 --- a/BUGS +++ b/BUGS @@ -105,6 +105,8 @@ Krebs (57) [FIXED]. - File browser aborts on Solaris in qsort() call. (Reported by Matthias Andree) (58) [FIXED]. +- Can modify the current file in view mode with ^W^R (discovered by Rocco + Corsi) (58) [FIXED]. ** Open BUGS ** diff --git a/ChangeLog b/ChangeLog index 30e49639..3a2472d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ Cvs code - +- search.c: + do_replace() + - If we manage to make it in somehow with VIEW_MODE on, abort + nicely (fixes BUG #59). + nano 1.0.1 - 04/06/2001 - General: - added configure option --disable-wrapping. Does what it says, diff --git a/proto.h b/proto.h index 68634d3f..aa0a53bc 100644 --- a/proto.h +++ b/proto.h @@ -140,6 +140,7 @@ void add_to_cutbuffer(filestruct * inptr); void do_replace_highlight(int highlight_flag, char *word); void nano_disabled_msg(void); void window_init(void); +void print_view_warning(void); #ifdef NANO_EXTRA void do_credits(void); #endif diff --git a/search.c b/search.c index 97f1ece7..34004a77 100644 --- a/search.c +++ b/search.c @@ -586,6 +586,12 @@ int do_replace(void) filestruct *begin; char *prevanswer = NULL, *buf = NULL; + if (ISSET(VIEW_MODE)) { + print_view_warning(); + replace_abort(); + return 0; + } + i = search_init(1); switch (i) { case -1: