From 65d73a2b54ddb390993738d9c6462af9a9661989 Mon Sep 17 00:00:00 2001 From: Mark Nudelman Date: Sun, 29 Nov 2020 09:02:29 -0800 Subject: [PATCH] Remove unnecessary call to pshift in pappend. The logic doesn't work if the curr position is close to the point where pappend decides to do the pshift. It's unnecessary because we call pshift in pdone at the end of the line. --- line.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/line.c b/line.c index 93f1089..851fc28 100644 --- a/line.c +++ b/line.c @@ -299,8 +299,6 @@ pshift(shift) if (ctldisp == OPT_ONPLUS && IS_CSI_START(c)) { /* Keep cumulative effect. */ - linebuf[to] = c; - attr[to++] = attr[from++]; while (from < curr && linebuf[from]) { linebuf[to] = linebuf[from]; @@ -904,18 +902,6 @@ pappend(c, pos) goto retry; } } - - /* - * If we need to shift the line, do it. - * But wait until we get to at least the middle of the screen, - * so shifting it doesn't affect the chars we're currently - * pappending. (Bold & underline can get messed up otherwise.) - */ - if (cshift < hshift && column > sc_width / 2) - { - linebuf[curr] = '\0'; - pshift(hshift - cshift); - } if (r) { /* How many chars should caller back up? */ -- 1.8.3.1