Commit e1e09d0
committed
This is a fix for the fact that I was treating savedY in two different
ways in the codebase, either a viewport relative value, or a buffer
relative value (0..<rows vs yBase offset).
I compared this to xterm.js which was the original code for this, and
they do not have that discrepancy - either it got fixed there, or I
introduced the bug.
https://gist.github.com/migueldeicaza/fb7470de4b4c9501c7eb660bc56a3ede
Now treats savedY as absolute (yBase-baesd). Also, it now converts
absolute savedY back to viewport row (savedY - yBase) and then clamps
via restrictCursor().
This should be a more comprehensive fix than the one reported in
#467
While auditing I found another difference, softReset now also resets the saved cursor position1 parent 14b0a2d commit e1e09d0
3 files changed
Lines changed: 55 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
760 | | - | |
761 | | - | |
762 | 760 | | |
763 | | - | |
764 | | - | |
765 | 761 | | |
766 | | - | |
767 | 762 | | |
768 | 763 | | |
769 | 764 | | |
| |||
2424 | 2419 | | |
2425 | 2420 | | |
2426 | 2421 | | |
2427 | | - | |
2428 | | - | |
| 2422 | + | |
2429 | 2423 | | |
2430 | | - | |
| 2424 | + | |
2431 | 2425 | | |
2432 | 2426 | | |
2433 | 2427 | | |
2434 | 2428 | | |
2435 | 2429 | | |
2436 | 2430 | | |
| 2431 | + | |
2437 | 2432 | | |
2438 | 2433 | | |
2439 | 2434 | | |
| |||
2954 | 2949 | | |
2955 | 2950 | | |
2956 | 2951 | | |
2957 | | - | |
| 2952 | + | |
2958 | 2953 | | |
2959 | 2954 | | |
2960 | 2955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
212 | 246 | | |
213 | 247 | | |
214 | 248 | | |
| |||
239 | 273 | | |
240 | 274 | | |
241 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
242 | 291 | | |
243 | 292 | | |
244 | 293 | | |
| |||
0 commit comments