projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cef481
)
vi: make "g<key>" error message less likely to show garbage
author
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 15 Sep 2016 11:53:42 +0000
(13:53 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 15 Sep 2016 11:53:42 +0000
(13:53 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/vi.c
patch
|
blob
|
history
diff --git
a/editors/vi.c
b/editors/vi.c
index 974f9978b90b5df4123d09195b071ece9662585a..c142dacd7f997f10fac6acd73f108777905e8730 100644
(file)
--- a/
editors/vi.c
+++ b/
editors/vi.c
@@
-3933,7
+3933,9
@@
static void do_cmd(int c)
c1 = get_one_char();
if (c1 != 'g') {
buf[0] = 'g';
- buf[1] = c1; // TODO: if Unicode?
+ // c1 < 0 if the key was special. Try "g<up-arrow>"
+ // TODO: if Unicode?
+ buf[1] = (c1 >= 0 ? c1 : '*');
buf[2] = '\0';
not_implemented(buf);
break;