Fix PROMPT_SP hack regression

Commit fbad0ab50a (reset_abandoning_line: remove redundant
allocations, 2025-11-13) uses byte count of ⏎ (3) instead of char
count (1), thus overestimating the number of spaces this symbol takes.

Fixes #12246
This commit is contained in:
Johannes Altmanninger
2025-12-31 07:31:31 +01:00
parent 7fa9e9bfb9
commit 810a707069
4 changed files with 18 additions and 9 deletions

View File

@@ -0,0 +1,10 @@
#RUN: %fish %s
#REQUIRES: command -v tmux
isolated-tmux-start
isolated-tmux send-keys "echo -n 12" Enter
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 0> echo -n 12
# CHECK: 12{{\u23CE|\^J|\u00b6|}}
# CHECK: prompt 1>