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

prompt overwrites text line if no newline is found #398

Open
fdncred opened this issue Apr 14, 2022 · 7 comments
Open

prompt overwrites text line if no newline is found #398

fdncred opened this issue Apr 14, 2022 · 7 comments
Labels
A-Display Area: Correctness of the display output and additional features needed there bug Something isn't working

Comments

@fdncred
Copy link
Collaborator

fdncred commented Apr 14, 2022

Platform Windows 11
Terminal software Windows Terminal

Describe the problem you are observing.
When the steps are followed below, you see the text initially appear on the screen and then the prompt overwrites the last line.

Steps to reproduce (from within nushell)

  1. touch a
  2. notepad a
  3. type some text, hit enter, type some more text and DO NOT hit enter (this is key, the last line must not have a crlf)
  4. cat a or type a shows both lines of text, and then when the prompt is drawn, it overwrites the last line
@fdncred fdncred added the bug Something isn't working label Apr 14, 2022
@sholderbach
Copy link
Member

Could not reproduce on linux with either cat testfile or nu's open --raw testfile (File had to be stripped of the last new line by perl -pi -e 'chomp if eof' testfile.txt). The prompt initialization assumes if the cursor is in the first column it can start there else it introduces a new line. Maybe the windows file dumping has different behavior there?

@sholderbach sholderbach added the A-Display Area: Correctness of the display output and additional features needed there label Apr 16, 2022
@fdncred
Copy link
Collaborator Author

fdncred commented Apr 16, 2022

Maybe it's only a Windows thing?

@fdncred
Copy link
Collaborator Author

fdncred commented Apr 16, 2022

@elferherrera, you use Windows. Can you reproduce this error?

@elferherrera
Copy link
Contributor

I followed the instructions but it seems to work fine
image

@fdncred
Copy link
Collaborator Author

fdncred commented Apr 17, 2022

I'm pretty sure it's only on the last/bottom line of the terminal. I guess I forgot to say that originally.

@DejayRezme
Copy link

I could reproduce the bug with open --raw testfile on windows terminal as well as wezterm and alacrtitty. I could not reproduce with 'type' command.

The other mentioned bug "reloading config hotkey deletes top line instead of adding it to scrollback" #5305 is reproducible on windows with windows terminal, wezterm and alacrtitty.

This was with 0.61.0

@fdncred fdncred changed the title prompt overwrites text line if not newline is found prompt overwrites text line if no newline is found Jul 23, 2024
@mati865
Copy link

mati865 commented Jul 24, 2024

From my experience with Nushell such issues might be dependent on terminal size or whether it was resized.

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

5 participants