about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-23 00:25:03 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-23 00:25:03 +0200
commit06a2f55dbcc67b731d1140d41af98ba316ecf5d6 (patch)
treee251840539551e8e8f418dbd76b48ff059f581d7 /src
parent3b76f5f08893c38227474abf3b265d9aea06c04f (diff)
downloadchawan-06a2f55dbcc67b731d1140d41af98ba316ecf5d6.tar.gz
term: fix clearEnd regression
Sending EL at EOL clears the last character, so we avoid doing that.
Diffstat (limited to 'src')
-rw-r--r--src/display/term.nim4
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()
cs/aerc/blame/commands/msg/recall.go?h=0.6.0&id=7f033278eb3afc3b9ae2dca28efe8d4a3514d14a'>^
3102ac3 ^

13a6a3f ^
3102ac3 ^























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142