From: Chris Allegretta Date: Sun, 22 Apr 2001 07:10:21 +0000 (+0000) Subject: Addand fix bug #59 X-Git-Tag: v1.1.0~78 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5050aa6ae7c22f4004efb9b674bf01d9965a241f;p=nano.git Addand fix bug #59 git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@612 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 31f73764..a0ecd36c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,9 @@ Cvs code - - search.c: do_gotoline() - Optimizations, remove "$" goes-to-last-line, less messages (Rocco) + do_replace() + - If we manage to make it in somehow with VIEW_MODE on, abort + nicely (fixes BUG #59). nano 1.1 tree forked here 04/07/2001 diff --git a/proto.h b/proto.h index a2498774..45baaee5 100644 --- a/proto.h +++ b/proto.h @@ -147,6 +147,7 @@ void do_replace_highlight(int highlight_flag, char *word); void nano_disabled_msg(void); void window_init(void); void do_mouse(void); +void print_view_warning(void); #ifdef ENABLE_NANORC void do_rcfile(void); diff --git a/search.c b/search.c index 715a32bb..7e04041a 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: