fix: prompt duplication when resizing with non-empty right_prompt#894
fix: prompt duplication when resizing with non-empty right_prompt#894blindFS wants to merge 2 commits intonushell:mainfrom
Conversation
|
Oops, what terminal are you using in that? |
That's ghostty on macos |
Hmmm, interesting. That means my duplication experience could be caused by bad configuration, OMG. |
|
I've found out the minimal steps required to reproduce the bug with ghostty on macOS and the default nu config:
So it's definitely more complicated than I thought. |
|
I was just running the reedline demo like this |
Oh, I mean the steps to reproduce #864. There are many factors that can determine how long-line text gets wrapped in a terminal. Due to my lack of knowledge about the terminal and OSC stuff, I can't find a proper way to locate the prompt start position given all those complications vary from app to app. So I'm going to close this PR for now. However, the method used in current reedline implementation (find cursor first, then rewind back by counting |

Supposed to fix #864 , this method works well on my mac with ghostty/wezterm/terminal, but I need help to test on other terminal/os.
After:
Screen.Recording.2025-03-24.at.10.15.40.AM.mov
The prompt start position goes up with the line-wrapped text, which is the same behavior as zsh.