From 874d317334fae1ddce316f9b6f4d0ce4e434bf52 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Tue, 23 Jun 2026 21:34:41 -0700 Subject: heirloom vi fixes from arch AUR --- ex_tty.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'ex_tty.c') diff --git a/ex_tty.c b/ex_tty.c index 20fe6e5..e9beb3b 100644 --- a/ex_tty.c +++ b/ex_tty.c @@ -79,6 +79,7 @@ static char sccsid[] = "@(#)ex_tty.c 1.30 (gritter) 8/4/05"; /* from ex_tty.c 7.10.1 (2.11BSD GTE) 12/9/94 */ +#include #include "ex.h" #include "ex_tty.h" @@ -132,8 +133,7 @@ char **sstrs[] = { &ED, &EI, &F0, &F1, &F2, &F3, &F4, &F5, &F6, &F7, &F8, &F9, &HO, &IC, &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU, &LL, &ND, &xNL, &xPC, &RC, &SC, &SE, &SF, &SO, &SR, &TA, &TE, &TI, &UP, &VB, &VS, &VE, - &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM, - &kI, &kD, &kh, &at7, &kP, &kN + &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM }; bool *sflags[] = { &AM, &BS, &DA, &DB, &EO, &HC, @@ -158,7 +158,7 @@ setterm(char *type) putpad(TE); if (tgetent(ltcbuf, type) != 1) { unknown++; - CP(ltcbuf, "xx|dumb:"); + lcpy(ltcbuf, "xx|dumb:", sizeof ltcbuf); } gettmode(); /* must call gettmode() before setsize(). GR */ setsize(); @@ -171,12 +171,7 @@ setterm(char *type) addmac1(KD, "j", "down", arrows, 1); addmac1(KL, "h", "left", arrows, 1); addmac1(KR, "l", "right", arrows, 1); - addmac1(kI, "i", "insert", arrows, 1); - addmac1(kD, "x", "delete", arrows, 1); - addmac1(kh, "^", "home", arrows, 1); - addmac1(at7, "$", "end", arrows, 1); - addmac1(kP, "", "pgup", arrows, 1); - addmac1(kN, "", "pgdn", arrows, 1); + addmac1(KH, "H", "home", arrows, 1); /* * Handle funny termcap capabilities @@ -345,7 +340,7 @@ zap(void) *(*fp++) = flag; namp += 2; } while (*namp); - namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERIkIkDkh@7kPkN"; + namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERI"; sp = sstrs; do { string = tgetstr(namp, &aoftspace); -- cgit v1.2.3