-
Notifications
You must be signed in to change notification settings - Fork 134
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
fix: overwriting of line #76 #77
Conversation
src/engine.rs
Outdated
@@ -768,6 +768,8 @@ impl Reedline { | |||
|
|||
let mut terminal_size = terminal::size()?; | |||
|
|||
self.stdout.queue(Print("\r\n"))?.flush()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we always want to send a crlf? I was wondering if we may just want to see that we're at the bottom of the screen and scroll the screen up a line if so.
While thinking about this issue, I noticed that maybe
because in |
Or should it be detected, if the position is already at (0, some_row) -> work from here, |
oh-my-zsh
> printf "jo"
jo%
oh-my-zsh
> printf "jo\n"
jo
oh-my-zsh
> this is an example from zsh with oh-my-zsh |
@ahkrr yeah, we could put the logic in to detect if we're not in the 0th column. Do you want to do that in a separate PR? |
Lets do that in a separate PR. |
sounds good |
Additional line was a crutch introduced to counteract misbehavior fixed in nushell#77 Similar behavior was already sneaked into engine-q with nushell/engine-q#508
Additional line was a crutch introduced to counteract misbehavior fixed in #77 Similar behavior was already sneaked into engine-q with nushell/engine-q#508
This happened, because the
prompt
would be drawn at theorigin
, which was determined to be at theposition()?
, which was in the previous line.Now, move one line downwards before determining the
origin
.