aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-09-15 13:53:42 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-09-15 13:53:42 +0200
commitde1996dac516a49cd4c86270b918721f6e9f3f5d (patch)
tree3aa62c4d088e5f1d0a3a06126304c8e32bd11a76
parent7cef4817d6d6d61a1166ed7dfc13537b95c65970 (diff)
downloadbusybox-w32-de1996dac516a49cd4c86270b918721f6e9f3f5d.tar.gz
busybox-w32-de1996dac516a49cd4c86270b918721f6e9f3f5d.tar.bz2
busybox-w32-de1996dac516a49cd4c86270b918721f6e9f3f5d.zip
vi: make "g<key>" error message less likely to show garbage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/vi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 974f9978b..c142dacd7 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3933,7 +3933,9 @@ static void do_cmd(int c)
3933 c1 = get_one_char(); 3933 c1 = get_one_char();
3934 if (c1 != 'g') { 3934 if (c1 != 'g') {
3935 buf[0] = 'g'; 3935 buf[0] = 'g';
3936 buf[1] = c1; // TODO: if Unicode? 3936 // c1 < 0 if the key was special. Try "g<up-arrow>"
3937 // TODO: if Unicode?
3938 buf[1] = (c1 >= 0 ? c1 : '*');
3937 buf[2] = '\0'; 3939 buf[2] = '\0';
3938 not_implemented(buf); 3940 not_implemented(buf);
3939 break; 3941 break;