Skip to content

Conversation

@lamchau
Copy link
Contributor

@lamchau lamchau commented Jun 6, 2025

fish v4 introduced new multiline prompt rendering behavior that breaks when interactive commands like navi are injected via keybindings. this resulted in partial prefix symbols (e.g. from a prompt's newline component) being left on screen and improperly rendering the expanded command (e.g. gzgzip instead of gzip).

this forces a full redraw so it's cosmetically identical to running navi (as a command without insertion)

Steps to repro

Prerequisites

  • fish v4.0.2 with tide prompt 6.1.1
  • navi 2.24.0
  • Example: gzip.cheat
% gzip

# compress and retain
gzip --keep --best <file>
  1. Trigger using \cg keybind (via navi widget fish | source)
  2. Select gzip cheat (e.g. gzip foo)
  3. Press enter

Expected: gzip --keep --best foo
Actual: gzgzip --keep --best foo (command is correct, painting is not)
image

fish v4 introduced new multiline prompt rendering behavior that breaks
when interactive commands like `navi` are injected via keybindings. this
resulted in partial prefix symbols (e.g. from a prompt's newline
component) being left on screen and improperly rendering the expanded
command (e.g. `gzgzip` instead of `gzip`).

this forces a full redraw so it's cosmetically identical to running
`navi` (as a command without insertion)
@lamchau lamchau requested a review from denisidoro as a code owner June 6, 2025 09:24
@welcome
Copy link

welcome bot commented Jun 6, 2025

Thanks for opening this pull request!

@alexis-opolka alexis-opolka requested review from alexis-opolka and removed request for denisidoro June 6, 2025 15:27
@alexis-opolka
Copy link
Collaborator

Hi @lamchau ,

Thank you for your PR.
Quick question, can you know the version of fish?

If you can, it would be better to enclose the redraw inside a condition since it doesn't apply on every version of fish.

@lamchau
Copy link
Contributor Author

lamchau commented Jun 6, 2025

@alexis-opolka - added a check in 0076018!

@alexis-opolka
Copy link
Collaborator

It looks good to me!

Could you just add some comments in the code on why we redraw if the version is greater than 4?
It would be even better if you could put a direct link to this PR.

After that I'll merge this PR, thanks a lot. ^^

@alexis-opolka
Copy link
Collaborator

Thanks a lot @lamchau !
I'm merging this PR now. ^-^

@alexis-opolka alexis-opolka merged commit 085ee01 into denisidoro:master Jun 10, 2025
1 check passed
@welcome
Copy link

welcome bot commented Jun 10, 2025

Congrats on merging your first pull request!

@lamchau lamchau deleted the fish-repaint branch June 13, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants