diff --git a/BUGS b/BUGS index 578854a594443981fa94df1e4f55837f3467f0b2..4f3acded41fb7c85de6f3f1e711c3e341ed405b2 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 31f73764daf32cfe56278ae04968005d2ba2d41e..a0ecd36c91f8e816625450768f0e96878ed97eaa 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 a249877481571108adf4dce7622a533aec406be5..45baaee59e24f0f31d1073629c5402f3182d5c73 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 715a32bbb018479d52cf819de2c92b2b46bae382..7e04041ae83628f807781d6c77642dc0cd55fd2f 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: