nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
551 stars 155 forks source link

`oh-my-posh` left and right prompt are not drawn at the same level #804

Closed Schweber closed 5 months ago

Schweber commented 5 months ago

I want to have the left and the right prompt at the same level at all times. However, the right prompt is drawn one line above as soon as the prompt is redrawn for the first time:

image

It worked before the update to nushell v0.95, could this have introduced this behavior?

Please see this issue in oh-my-posh.

key value
version 0.95.0
major 0
minor 95
patch 0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.78.0 (9b00956e5 2024-04-29) (built from a source tarball)
cargo_version cargo 1.78.0
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash
installed_plugins
fdncred commented 5 months ago

What happens if you change this setting in the config.nu render_right_prompt_on_last_line?

Schweber commented 5 months ago

Setting render_right_prompt_on_last_line: true resolves the issue.

I recently merged the config.nu of the new nushell version into my old one and i guess i changed the setting in the process, causing this issue.

Thank you!

sholderbach commented 4 months ago

Still curious why it appeared above and setting it to true fixed it. I thought the idea of the setting was that it takes effect when your input/prompt gets longer than one line to keep the right prompt out of the way or if false at the same height as the left prompt.