Open LoganDark opened 1 year ago
For me prompt-toolkit uses every available column in the terminal.
For me prompt-toolkit uses every available column in the terminal.
well, for me, in both Windows Terminal and conhost.exe, there is an unoccupied column on the right.
applying the monkey-patch fixes the issue.
if it uses every available column for you, then something is going on for sure. this might be a workaround for some issue that still affects some terminals? but it's clearly not needed for mine
https://github.com/prompt-toolkit/python-prompt-toolkit/blob/5b3dd6dbbd72ac8323e749cc12e6aa2d7c7411af/src/prompt_toolkit/renderer.py#L199-L200
The renderer always subtracts one from the terminal width, leaving a column on the right unoccupied. This is a column that the application could be using (and seemingly has no reason to avoid), and looks ugly.
This monkey-patch seems to work perfectly fine, for fullscreen and non-fullscreen applications:
Perhaps prompt-toolkit used to rely on some cursor positioning detail that required a workaround, but that doesn't seem to be the case anymore. I propose simply removing the
- 1
altogether. Is there even any reason to keep it?