aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/vi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 459f374f7..e09e0d9c7 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -598,11 +598,15 @@ int vi_main(int argc, char **argv)
598 //----- This is the main file handling loop -------------- 598 //----- This is the main file handling loop --------------
599 save_argc = argc; 599 save_argc = argc;
600 optind = 0; 600 optind = 0;
601 // "Save cursor, use alternate screen buffer, clear screen"
602 write1("\033[?1049h");
601 while (1) { 603 while (1) {
602 edit_file(argv[optind]); /* param might be NULL */ 604 edit_file(argv[optind]); /* param might be NULL */
603 if (++optind >= argc) 605 if (++optind >= argc)
604 break; 606 break;
605 } 607 }
608 // "Use normal screen buffer, restore cursor"
609 write1("\033[?1049l");
606 //----------------------------------------------------------- 610 //-----------------------------------------------------------
607 611
608 return 0; 612 return 0;