From: Dennis Groenen Date: Sat, 23 Jun 2012 10:10:19 +0000 (+0200) Subject: backport: vi: save/restore screen upon invocation X-Git-Tag: 1.20.1power2~1 X-Git-Url: http://git.maemo.org/git/?p=busybox-power;a=commitdiff_plain;h=6b1e034af8aad3a692da8f254850d35a14c6d54a backport: vi: save/restore screen upon invocation --- diff --git a/debian/patches/patches-backports/0001-backport-vi-save-restore-screen-upon-invocation.patch b/debian/patches/patches-backports/0001-backport-vi-save-restore-screen-upon-invocation.patch new file mode 100644 index 0000000..885c205 --- /dev/null +++ b/debian/patches/patches-backports/0001-backport-vi-save-restore-screen-upon-invocation.patch @@ -0,0 +1,33 @@ +From 5b7472b9b70a16201bcaa4cb69c617c19b889b77 Mon Sep 17 00:00:00 2001 +From: Dennis Groenen +Date: Fri, 22 Jun 2012 21:49:21 +0200 +Subject: [PATCH] backport: vi: save/restore screen upon invocation + +Backport of git commit d3dff879f0683c2a4119f694c1b20c96ee030a26 +--- + editors/vi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/editors/vi.c b/editors/vi.c +index b4ad12e..8aea2e2 100644 +--- a/editors/vi.c ++++ b/editors/vi.c +@@ -603,11 +603,15 @@ int vi_main(int argc, char **argv) + optind = 0; + + //----- This is the main file handling loop -------------- ++ // "Save cursor, use alternate screen buffer, clear screen" ++ write1("\033[?1049h"); + while (1) { + edit_file(argv[optind]); /* param might be NULL */ + if (++optind >= argc) + break; + } ++ // "Use normal screen buffer, restore cursor" ++ write1("\033[?1049l"); + //----------------------------------------------------------- + + return 0; +-- +1.7.11 + diff --git a/debian/patches/series b/debian/patches/series index b5c9c45..3a98367 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,6 +27,7 @@ hotfixes/busybox-1.20.1-ps.patch hotfixes/busybox-1.20.1-tar.patch #Patched pulled from busybox git +patches-backports/0001-backport-vi-save-restore-screen-upon-invocation.patch #Miscellaneous