diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-23 00:25:03 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-23 00:25:03 +0200 |
commit | 06a2f55dbcc67b731d1140d41af98ba316ecf5d6 (patch) | |
tree | e251840539551e8e8f418dbd76b48ff059f581d7 | |
parent | 3b76f5f08893c38227474abf3b265d9aea06c04f (diff) | |
download | chawan-06a2f55dbcc67b731d1140d41af98ba316ecf5d6.tar.gz |
term: fix clearEnd regression
Sending EL at EOL clears the last character, so we avoid doing that.
-rw-r--r-- | src/display/term.nim | 4 |
1 files changed, 3 insertions, 1 deletions
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() |