You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Completions pager should redraw if the subbed completion wraps/unwraps the line #8405
If the user has a command typed out that is approaching the width of the terminal and attempts to page through completions for an argument, an argument may be subbed in that causes the line to wrap (e.g. the prompt now takes n+1 lines), while tabbing away to a different suggested completion may cause the line to then unwrap (prompt goes back to n lines). Neither the prompt nor the pager are redrawn when this wrapping/unwrapping happens, so what's displayed in the tty emulator (apart from the selected completion's line which is redrawn) does not match the actual contents (off-by-one error). This causes corruption of the prompt regardless of whether a completion is ultimately chosen or which completion was chosen, leaving the terminal in a corrupted state (the prompt is broken up, incorrect, and scrolled out of view).
This doesn't happen under asciinema because the emulated TERM doesn't support our rich completions pager but here's a video capture:
2021-11-05-122427.mp4
You can see when the prompt first breaks (when the first too-long completion is selected) and if you look closely you can observe the oddities in the appearance of the selected item as I tab to and from the long completion. After the pager is closed (completion abandoned), I scroll up and you can see the detritus of the wrapping and unwrapping.
Reacted by Johannes Altmanninger and Emily Grace Seville
I'm struggling to reproduce this.
Looks like something that should have been fixed by ada03d3 (Correct pager size when command line soft-wraps, 2020-07-05).
There are other issues like #7296 where we redraw wrongly when we occupy all lines on the screen.
This might be fixed by 0cd3ed4 but I didn't verify that (I wasn't sure if github would interpret "Possibly closes " like that).
Also, I forgot the changelog again, maybe it should be left out since it's not so actionable for users (who didn't notice the bug)?
Activity
floam commentedon Nov 5, 2021
Ew, command line guts!
krobelus commentedon Nov 6, 2021
I'm struggling to reproduce this.
Looks like something that should have been fixed by ada03d3 (Correct pager size when command line soft-wraps, 2020-07-05).
There are other issues like #7296 where we redraw wrongly when we occupy all lines on the screen.
krobelus commentedon Dec 2, 2021
This might be fixed by 0cd3ed4 but I didn't verify that (I wasn't sure if github would interpret "Possibly closes " like that).
Also, I forgot the changelog again, maybe it should be left out since it's not so actionable for users (who didn't notice the bug)?
CHANGELOG updates for 3.4.0