Soft-wrapped autosuggestion to hide right prompt for now

Prior to f417cbc981 (Show soft-wrapped portions in autosuggestions,
2025-12-11), we'd truncate autosuggestions before the right prompt.
We no longer do that for autosuggestions that soft-wrap, which means
we try to draw both right prompt and suggestion in the same space.

Make suggestion paint over right prompt for now, since this seems to
be a simple and robust solution.  We can revisit this later.

Fixes #12255
This commit is contained in:
Johannes Altmanninger
2026-01-02 17:57:40 +01:00
parent 725cf33f1a
commit 0a23a78523
3 changed files with 66 additions and 35 deletions

View File

@@ -0,0 +1,22 @@
#RUN: %fish %s
#REQUIRES: command -v tmux
isolated-tmux-start -C '
function fish_right_prompt
echo RP
end
history append "echo $(string repeat 100 a)"
'
isolated-tmux send-keys Enter e
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 0> {{ *}} RP
# CHECK: prompt 0> echo {{(a{65,})}}
# CHECK: {{(a{35,})}}
isolated-tmux send-keys C-h C-l "echo line1" M-Enter "e"
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 0> echo line1 {{ *}} RP
# CHECK: echo {{(a{65,})}}
# CHECK: {{(a{35,})}}