← Commit list

b9aaa375a

Ron Yorston
Ron Yorston
2021-04-28
SUCCESS Duration: 154s

Subject

vi: 'ZZ' should warn if there are more files to edit

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+8 -0
@@ -4010,6 +4010,14 @@ static void do_cmd(int c)
} else {
editing = 0;
}
+ // are there other files to edit?
+ j = cmdline_filecnt - optind - 1;
+ if (editing == 0 && j > 0) {
+ editing = 1;
+ modified_count = 0;
+ last_modified_count = -1;
+ status_line_bold("%u more file(s) to edit", j);
+ }
break;
case '^': // ^- move to first non-blank on line
dot_begin();