← Commit list

1380df7a5

Denys Vlasenko
Denys Vlasenko
2026-02-07
SUCCESS Duration: 162s

Subject

vi: fix last commit - do terminate the :CMD on the first whitespace

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
gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer      -Iinclude -Iinclude -o applets/usage applets/usage.c

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+1 -0
@@ -2888,6 +2888,7 @@ static void colon(char *buf)
// get the COMMAND into cmd[]
safe_strncpy(cmd, buf, sizeof(cmd));
+ skip_non_whitespace(cmd)[0] = '\0';
useforce = last_char_is(cmd, '!');
if (useforce && useforce > cmd)
*useforce = '\0'; // "CMD!" -> "CMD" (unless single "!")