From 06a2f55dbcc67b731d1140d41af98ba316ecf5d6 Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 23 Jun 2023 00:25:03 +0200 Subject: term: fix clearEnd regression Sending EL at EOL clears the last character, so we avoid doing that. --- src/display/term.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/display/term.nim b/src/display/term.nim index 9f1c3c33..1b1f82d7 100644 --- a/src/display/term.nim +++ b/src/display/term.nim @@ -390,6 +390,7 @@ proc generateSwapOutput(term: Terminal, grid, prev: FixedGrid): string = if grid[y * grid.width + x] != prev[y * grid.width + x]: change = true cx = x + w = x break if change: if cx == 0 and vy != -1: @@ -405,7 +406,8 @@ proc generateSwapOutput(term: Terminal, grid, prev: FixedGrid): string = let cell = grid[y * grid.width + x] result &= term.processFormat(format, cell.format) result &= term.processOutputString(cell.str, w) - result &= term.clearEnd() + if w < grid.width: + result &= term.clearEnd() proc hideCursor*(term: Terminal) = term.outfile.hideCursor() -- cgit 1.4.1-2-gfad0