commit 5050aa6ae7c22f4004efb9b674bf01d9965a241f
parent 4dfaf93bcd9ce859114b55d0772d94bd9575dc3d
Author: Chris Allegretta <chrisa@asty.org>
Date: Sun, 22 Apr 2001 07:10:21 +0000
Addand fix bug #59
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
4 files changed, 12 insertions(+), 0 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -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: