Unwanted empty space at end of output
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start at the _output_screen_diff function and inspect how each line's character cell is emitted. Reproduce the issue with an empty terminal running IPython, then verify that empty lines no longer add a trailing space while lines with content still render correctly.
Written by the indexing model from the issue text.
Description
In _output_screen_diff we unconditionally draw a character cell (perhaps containing a space) at each line whether or not that line has any actual content. The result is unwanted spaces appearing at the end of output, e.g. if you start ipython in an empty terminal, the bottom-left corner of that terminal will have a space in it.
If we replace
output_char(new_char)
with
if new_max_line_len:
output_char(new_char)
we don't output the character when we nothing to show and end up with a cleaner terminal for the user.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prompt-toolkit/python-prompt-toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
prompt-toolkit/python-prompt-toolkit#2073 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
prompt-toolkit/python-prompt-toolkit#1154 · 1 comment ·
All issues in prompt-toolkit/python-prompt-toolkit
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·