mirror of
https://github.com/denisidoro/navi.git
synced 2026-01-23 02:14:19 +00:00
fix: prevent prompt corruption in fish v4
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)
This commit is contained in:
parent
e657f4b6b5
commit
023e52d1fb
1 changed files with 2 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ function _navi_smart_replace
|
|||
set --local best_match (navi --print --query "$query" --best-match)
|
||||
if test -n "$best_match"
|
||||
commandline --current-process $best_match
|
||||
commandline -f repaint
|
||||
return
|
||||
end
|
||||
end
|
||||
|
|
@ -12,6 +13,7 @@ function _navi_smart_replace
|
|||
set --local candidate (navi --print --query "$query")
|
||||
if test -n "$candidate"
|
||||
commandline --current-process $candidate
|
||||
commandline -f repaint
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue