[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH 5/8] vi: preserve state when switching file
From: Ron Yorston <rmy () pobox ! com>
Date: 2021-04-25 10:53:54
Message-ID: 60854a42.nN2qLm21EG5Z7dzt%rmy () pobox ! com
[Download RAW message or body]
When a new file is opened from an existing editing session the
following details should be preserved:
- the last command used;
- the last character searched for on a line.
function old new delta
edit_file 849 835 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-14) Total: -14 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
---
editors/vi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/editors/vi.c b/editors/vi.c
index 7de55d1e6..8d9d04a88 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -4462,7 +4462,6 @@ static void edit_file(char *fn)
mark[26] = mark[27] = text; // init "previous context"
#endif
- last_search_char = '\0';
#if ENABLE_FEATURE_VI_CRASHME
last_input_char = '\0';
#endif
@@ -4489,7 +4488,6 @@ static void edit_file(char *fn)
#if ENABLE_FEATURE_VI_DOT_CMD
free(ioq_start);
ioq_start = NULL;
- lmc_len = 0;
adding2q = 0;
#endif
--
2.30.2
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic