reedline icon indicating copy to clipboard operation
reedline copied to clipboard

prompt overwrites text line if not newline is found

Open fdncred opened this issue 2 years ago • 6 comments

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 avatar Apr 14 '22 13:04 fdncred

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 avatar Apr 16 '22 17:04 sholderbach

Maybe it's only a Windows thing?

fdncred avatar Apr 16 '22 17:04 fdncred

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

fdncred avatar Apr 16 '22 17:04 fdncred

I followed the instructions but it seems to work fine image

elferherrera avatar Apr 17 '22 20:04 elferherrera

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

fdncred avatar Apr 17 '22 22:04 fdncred

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

DejayRezme avatar May 02 '22 22:05 DejayRezme