Skip to content

Avoid rewrapping styled trailing fills on resize - #2103

Open
dajiaohuang wants to merge 1 commit into
prompt-toolkit:mainfrom
dajiaohuang:fix/1933-styled-trailing-fill
Open

dajiaohuang wants to merge 1 commit into
prompt-toolkit:mainfrom
dajiaohuang:fix/1933-styled-trailing-fill

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Verification

  • uv run pytest tests/test_renderer_trailing_fill.py: 3 passed.
  • Ruff check/format, mypy, and git diff --check: passed.
  • Full suite: 150 passed, 5 skipped, 4 failed. The same four failures reproduced on the base commit: two input-history assertions, the memory-leak check, and the Windows console-buffer test.
  • Matched 120×24 benchmark: styled-fill median improved from 2.708 to 0.374 ms/call (7.24×); plain-row control was 0.156 to 0.154 ms/call, within sample variation.

Compatibility

The VT CSI K erase uses the active background only when the terminal supports and enables background-color erase (bce). A terminal with BCE disabled may erase to its default background; the issue report names GNU screen with defbce off as an example. See ncurses terminfo(5) and xterm control sequences. The implementation limits this path to background-only fills and preserves literal rendering for other styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal resize causes prompt_toolkit to print the prompt and the current input again and again

1 participant