Repository navigation
Commit 2f4b5dd
committed
Remember the toolbar's rows until it has been drawn for the command
An unfinished line is continued only while it and the toolbar fit on the
screen together, and the display reported the toolbar's rows from the frame
it last drew. Each run of the application forgets what it drew, and
prompt-toolkit leaves the toolbar out until the terminal has reported where
its cursor is. A command which writes at once does so before that report
arrives, so the toolbar counted for no rows and a toolbar of two rows was
allowed for as one: a line one row too tall for it was continued, and its
first row was shown twice.
Windows knows the height of its console without asking, so this showed only
on terminals which answer a cursor position request.
Keep the rows from the last frame which drew the toolbar, starting with the
main prompt's, which are the rows it is about to take again.1 parent 939ce21 commit 2f4b5dd
2 files changed
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
| |||
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
| 358 | + | |
352 | 359 | | |
353 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
354 | 367 | | |
355 | 368 | | |
356 | | - | |
357 | | - | |
| 369 | + | |
358 | 370 | | |
359 | 371 | | |
360 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
571 | 598 | | |
572 | 599 | | |
573 | 600 | | |
| |||
0 commit comments