diff options
author | Ron Yorston <rmy@pobox.com> | 2022-10-12 10:43:26 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-10-12 10:43:26 +0100 |
commit | 49c6f079acb4edae84b4496bd941cdbb5048ba01 (patch) | |
tree | ac54ecaad45050f7bfe274a11db29882aa32a9a8 /editors/vi.c | |
parent | a55cf07365ec2ff51749a77e09ae9edac79a99fe (diff) | |
parent | c8c1fcdba163f264a503380bc63485aacd09214c (diff) | |
download | busybox-w32-49c6f079acb4edae84b4496bd941cdbb5048ba01.tar.gz busybox-w32-49c6f079acb4edae84b4496bd941cdbb5048ba01.tar.bz2 busybox-w32-49c6f079acb4edae84b4496bd941cdbb5048ba01.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c index b813747d1..574feb465 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -4480,8 +4480,14 @@ static void do_cmd(int c) | |||
4480 | goto dc_i; // start inserting | 4480 | goto dc_i; // start inserting |
4481 | break; | 4481 | break; |
4482 | case 'Z': // Z- if modified, {write}; exit | 4482 | case 'Z': // Z- if modified, {write}; exit |
4483 | // ZZ means to save file (if necessary), then exit | ||
4484 | c1 = get_one_char(); | 4483 | c1 = get_one_char(); |
4484 | // ZQ means to exit without saving | ||
4485 | if (c1 == 'Q') { | ||
4486 | editing = 0; | ||
4487 | optind = cmdline_filecnt; | ||
4488 | break; | ||
4489 | } | ||
4490 | // ZZ means to save file (if necessary), then exit | ||
4485 | if (c1 != 'Z') { | 4491 | if (c1 != 'Z') { |
4486 | indicate_error(); | 4492 | indicate_error(); |
4487 | break; | 4493 | break; |