Date: Monday, May 10, 2021 @ 09:10:55 Author: foutrelis Revision: 414900
upgpkg: vi 1:070224-5: fix cursor position with line numbers https://bugs.archlinux.org/task/70770 Added: vi/trunk/linenum.patch Modified: vi/trunk/PKGBUILD ---------------+ PKGBUILD | 7 +++++- linenum.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-05-10 07:18:21 UTC (rev 414899) +++ PKGBUILD 2021-05-10 09:10:55 UTC (rev 414900) @@ -3,7 +3,7 @@ pkgname=vi pkgver=070224 -pkgrel=4 +pkgrel=5 epoch=1 pkgdesc="The original ex/vi text editor" arch=('x86_64') @@ -14,11 +14,13 @@ source=(https://sources.archlinux.org/other/$pkgname/ex-$pkgver.tar.xz{,.sig} fix-tubesize-short-overflow.patch navkeys.patch + linenum.patch preserve-dir.patch) sha256sums=('c3e52dd44edd1f6bf0b52207f717c56149dc50aac0d131fff3851d589727f52f' 'SKIP' '42167fabebe30a13d594346b1d254db82090ba41742a9f35b8895d37092053f0' '0e9e2d381f1d8cb86daae68462b3849825b003c08007725c0db9939d3d5bf58d' + '4539f46cd839475c168a9c463f041354463e90e810b973a10c499c2727b008e7' 'f0ef9ed2ccea98bf47b08dd3faa2abb911b4e6c0579f5294e9d0e8742282ff65') validpgpkeys=('86CFFCA918CF3AF47147588051E8B148A9999C34') @@ -28,6 +30,9 @@ patch -Np1 -i ../fix-tubesize-short-overflow.patch patch -Np1 -i ../navkeys.patch + # https://bugs.archlinux.org/task/70770 + patch -Np1 -i ../linenum.patch + # https://bugs.archlinux.org/task/20653 patch -Np1 -i ../preserve-dir.patch } Added: linenum.patch =================================================================== --- linenum.patch (rev 0) +++ linenum.patch 2021-05-10 09:10:55 UTC (rev 414900) @@ -0,0 +1,61 @@ +From 891c4022e24063608b554b6b3e4b5e2533e5443b Mon Sep 17 00:00:00 2001 +From: n-t-roff <[email protected]> +Date: Fri, 22 Apr 2016 19:08:05 +0200 +Subject: [PATCH] set nu bug fixed + +--- + ex_put.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ex_put.c b/ex_put.c +index fb7446e..0760747 100644 +--- a/ex_put.c ++++ b/ex_put.c +@@ -298,7 +298,7 @@ normline(int unused, int max) + + (void)unused; + if (max > 0) +- vcntcol = 0; ++ vcntcol = value(NUMBER) << 3; + if (shudclob) + slobber(linebuf[0]); + /* pdp-11 doprnt is not reentrant so can't use "printf" here + +From ad7f1e567324494021135bd2ec680b656a3f1cab Mon Sep 17 00:00:00 2001 +From: n-t-roff <[email protected]> +Date: Wed, 27 Jul 2016 18:58:47 +0200 +Subject: [PATCH] Number mode command line bugfix + +The prev. number mode bugfix did introduce a bug in the command line +cursor position when using backspace in number mode. Should be +fixed now. +--- + ex_put.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ex_put.c b/ex_put.c +index 26236d4..09ad403 100644 +--- a/ex_put.c ++++ b/ex_put.c +@@ -277,9 +277,12 @@ int + numbline(int i, int max) + { + ++ extern short vcntcol; + if (shudclob) + slobber(' '); + max -= printf("%6d ", i); ++ if (max > 0) ++ vcntcol = value(NUMBER) << 3; + return normline(0, max); + } + +@@ -297,8 +300,6 @@ normline(int unused, int max) + int c, n; + int ret = 0; + +- if (max > 0) +- vcntcol = value(NUMBER) << 3; + if (shudclob) + slobber(linebuf[0]); + /* pdp-11 doprnt is not reentrant so can't use "printf" here
