X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=debian%2Fpatches%2Fpatches-backports%2F0001-backport-vi-save-restore-screen-upon-invocation.patch;fp=debian%2Fpatches%2Fpatches-backports%2F0001-backport-vi-save-restore-screen-upon-invocation.patch;h=885c2056b7017eb3ef09fd5f001fed022f8ce7c6;hb=6b1e034af8aad3a692da8f254850d35a14c6d54a;hp=0000000000000000000000000000000000000000;hpb=93d84dd781b989341dbc7dbc3359b20b48d9a1b1;p=busybox-power 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 +