1 From 5b7472b9b70a16201bcaa4cb69c617c19b889b77 Mon Sep 17 00:00:00 2001
2 From: Dennis Groenen <tj.groenen@gmail.com>
3 Date: Fri, 22 Jun 2012 21:49:21 +0200
4 Subject: [PATCH] backport: vi: save/restore screen upon invocation
6 Backport of git commit d3dff879f0683c2a4119f694c1b20c96ee030a26
9 1 file changed, 4 insertions(+)
11 diff --git a/editors/vi.c b/editors/vi.c
12 index b4ad12e..8aea2e2 100644
15 @@ -603,11 +603,15 @@ int vi_main(int argc, char **argv)
18 //----- This is the main file handling loop --------------
19 + // "Save cursor, use alternate screen buffer, clear screen"
20 + write1("\033[?1049h");
22 edit_file(argv[optind]); /* param might be NULL */
26 + // "Use normal screen buffer, restore cursor"
27 + write1("\033[?1049l");
28 //-----------------------------------------------------------