From 023e52d1fbda6a2ca53e8b06fbc1845519007c46 Mon Sep 17 00:00:00 2001 From: Lam Chau Date: Fri, 6 Jun 2025 02:09:06 -0700 Subject: [PATCH] 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) --- shell/navi.plugin.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/navi.plugin.fish b/shell/navi.plugin.fish index 2de4c74..419906e 100644 --- a/shell/navi.plugin.fish +++ b/shell/navi.plugin.fish @@ -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