Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When prompt starting row is 0, new prompt is rendered on each key type #756

Open
kit494way opened this issue Feb 19, 2024 · 5 comments
Open
Labels
A-Display Area: Correctness of the display output and additional features needed there bug Something isn't working

Comments

@kit494way
Copy link
Contributor

Platform Windows 11 WSL2 Ubuntu 20.04,
Terminal software wsltty 3.5.1

Describe the problem you are observing.

Steps to reproduce

  1. Execute clear to make prompt starting row 0.
  2. Type anything
  3. Scroll terminal.

Screenshots/Screencaptures

screenshot

@kit494way kit494way added the bug Something isn't working label Feb 19, 2024
@fdncred
Copy link
Collaborator

fdncred commented Feb 19, 2024

My guess is that this was related to redrawing the prompt with every keystroke, which reedline also probably shouldn't be doing.

On Wezterm on Windows I don't think it matters, it always repeats the prompt with every keystroke.

@sholderbach
Copy link
Member

This appears to be a separate pathology. Yes we blindly redraw but @kit494way diagnosed that with everything on line 0 instead of overdrawing the previous content it moves the "paper" ahead. This would likely be something in the logic that initializes the prompt position.

@sholderbach sholderbach added the A-Display Area: Correctness of the display output and additional features needed there label Feb 19, 2024
@sholderbach
Copy link
Member

This appears to also require that the prompt spans multiple lines for the problem to arise:

Here manually scrolling up after Ctrl-L with my single line prompt

grafik

@kit494way
Copy link
Contributor Author

This problem appears to arise with specific terminal applications.
I can not reproduce with Windows Terminal.
With wsltty, I can reproduce the problem even when the prompt spans multiple lines.

@fdncred
Copy link
Collaborator

fdncred commented Feb 19, 2024

That's why I think this is similar to WezTerm on Windows. It's something to do with the pty iirc but I think the main culprit is nushell drawing the prompt on ever character. There may be more information on issues here with WezTerm in the body.

I can't even get wsltty to work right now.
With WSL/g these work fine. So, I think it's the windows side like I mentioned above.
kgx works
alacritty works
wezterm works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Display Area: Correctness of the display output and additional features needed there bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants