diff --git a/top/top.c b/top/top.c index d6c80602..1a899cd6 100644 --- a/top/top.c +++ b/top/top.c @@ -1337,6 +1337,7 @@ static char *ioline (const char *prompt) { #define chkCUR { if (cur < 0) cur = 0; if (cur > len) cur = len; } // thank goodness ol' memmove will safely allow strings to overlap #define sqzSTR { i = utfTOT(pos); while (i < 0) i = utfTOT(--pos); \ + if (!utfCOL(pos + i)) i += utfTOT(pos + i); \ memmove(&buf[pos], &buf[pos + i], bufMAX-(pos + i)); \ memset(&buf[bufMAX - i], '\0', i); } #define expSTR(X) if (bufNXT < bufMAX && scrNXT < Screen_cols) { \