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

[Bug] Multiline repainting at the end of the screen #119

Closed
sholderbach opened this issue Jul 25, 2021 · 11 comments
Closed

[Bug] Multiline repainting at the end of the screen #119

sholderbach opened this issue Jul 25, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@sholderbach
Copy link
Member

When entering a multiline new line (Alt-Enter) with the prompt positioned at the bottom of the terminal screen, repainting introduces erroneous new prompt lines on every repaint. This behavior stops when repositioning the prompt to the top via Ctrl-L.

Platform:
Linux/Ubuntu 20.04
Terminal Emulator:
gnome-terminal

image

@sholderbach sholderbach added the bug Something isn't working label Jul 25, 2021
@mzanrosso
Copy link
Contributor

This is the same behavior that I faced when i was building the hints under prompt; unfortunately i blocked that feature because I wasn't able to solve this problem

@mzanrosso
Copy link
Contributor

@sholderbach From what i understand the cursor position for some reason is not updated for one of the two functions that draw the prompt; this means that the two functions are no longer in synchrony and therefore that effect is obtained

@mzanrosso
Copy link
Contributor

I strongly suggest reviewing the way we store/update the cursor position and how we draw the lines before and after the buffer

@stormasm
Copy link
Contributor

Might be related to my comments in #132

@sholderbach
Copy link
Member Author

Fixed by #148

https://www.youtube.com/watch?v=S26iiFC9_bo shows JT's debugging process

@stormasm
Copy link
Contributor

@sholderbach I am still seeing an issue with this on the mac... If you type CMD K when you are at the bottom of the screen it clears the screen like it should but then redraws the cursor at the bottom of the screen. When you are in a regular shell / not reedline / it clears the screen like it should behave....

@sholderbach sholderbach reopened this Sep 27, 2021
@sophiajt
Copy link
Contributor

@stormasm - can we close this and open a new issue for that specific problem? I think the repaint is okay but this seems related to screen clearing not resetting some of the bookkeeping.

@stormasm
Copy link
Contributor

ok cool will open a new issue...

@sholderbach
Copy link
Member Author

I was not directly able to reproduce this from your description on linux/gnome-terminal. Was this in a multi line context?

I encountered a different case: After resizing the window I also observe this continues painting assuming the wrong prompt position, but this is without a multiline entry necessary

@stormasm
Copy link
Contributor

@sholderbach it was not a multiline context, it was simply typing the CMD k at the bottom of the screen, so @jntrnr said to close it and then I will open a new issue related to screen clearing.

@sholderbach
Copy link
Member Author

@jntrnr will close accordingly

Reopen if multiline content entered causes this prompt scrolling/overpainting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants