aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorAndrew Fuller <abf@google.com>2015-05-03 18:18:25 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-05-03 18:18:25 +0200
commit4d8ddb810d52f5ad1bcef8bda07687200117e56b (patch)
treeac46c259745503425eb53208d993beb7e5e6e117 /editors/vi.c
parentbbd53216f80912944da0d4ca72bf3ed3188ca156 (diff)
downloadbusybox-4d8ddb810d52f5ad1bcef8bda07687200117e56b.tar.gz
vi: basic undo feature shouldn't depend on yankmark
Currently basic undo functionality with the 'u' key depends on FEATURE_VI_YANKMARK. These two features are separate, so we can remove this dependency. Signed-off-by: Andrew Fuller <abf@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 495332a46..2e4f7fcb5 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3676,11 +3676,6 @@ static void do_cmd(int c)
string_insert(dot, p, ALLOW_UNDO); // insert the string
end_cmd_q(); // stop adding to q
break;
-#if ENABLE_FEATURE_VI_UNDO
- case 'u': // u- undo last operation
- undo_pop();
- break;
-#endif
case 'U': // U- Undo; replace current line with original version
if (reg[Ureg] != NULL) {
p = begin_line(dot);
@@ -3692,6 +3687,11 @@ static void do_cmd(int c)
}
break;
#endif /* FEATURE_VI_YANKMARK */
+#if ENABLE_FEATURE_VI_UNDO
+ case 'u': // u- undo last operation
+ undo_pop();
+ break;
+#endif
case '$': // $- goto end of line
case KEYCODE_END: // Cursor Key End
for (;;) {