← Commit list

de1996dac

Denys Vlasenko
Denys Vlasenko
2016-09-15
SUCCESS Duration: 271s

Subject

vi: make "g" error message less likely to show garbage

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+3 -1
@@ -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;