Commit bc0b656
committed
terminal: fix crash when selected an empty row
Previously we prevented empty rows intentionally for the purpose of
accounting the scroll back buffer's capacity. However, when adding
reflow() the same constraint was not kept, meaning we would end up
with empty rows in the scroll back.
Since empty rows are more memory efficient we should just handle them
properly. Scroll back accounting now treats empty rows as having a
single cell in them. Selection related code paths now handle empty
rows properly.1 parent f2bc34a commit bc0b656
File tree
3 files changed
+41
-8
lines changed- lib
- src/terminal
- test/src
3 files changed
+41
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 298 | | |
302 | 299 | | |
303 | 300 | | |
304 | 301 | | |
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
308 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1460 | 1460 | | |
1461 | 1461 | | |
1462 | 1462 | | |
1463 | | - | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1464 | 1468 | | |
1465 | 1469 | | |
1466 | 1470 | | |
| |||
1474 | 1478 | | |
1475 | 1479 | | |
1476 | 1480 | | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1477 | 1485 | | |
1478 | 1486 | | |
1479 | 1487 | | |
| |||
1528 | 1536 | | |
1529 | 1537 | | |
1530 | 1538 | | |
1531 | | - | |
1532 | 1539 | | |
1533 | 1540 | | |
1534 | 1541 | | |
| |||
1585 | 1592 | | |
1586 | 1593 | | |
1587 | 1594 | | |
1588 | | - | |
| 1595 | + | |
1589 | 1596 | | |
1590 | 1597 | | |
1591 | 1598 | | |
| |||
1644 | 1651 | | |
1645 | 1652 | | |
1646 | 1653 | | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
1647 | 1660 | | |
1648 | 1661 | | |
1649 | 1662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
384 | 403 | | |
385 | 404 | | |
386 | 405 | | |
| |||
1084 | 1103 | | |
1085 | 1104 | | |
1086 | 1105 | | |
| 1106 | + | |
1087 | 1107 | | |
1088 | 1108 | | |
1089 | 1109 | | |
| |||
0 commit comments