aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c8
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;