fish-shell/tests/checks/tmux-signal-multiline-prompt.fish
Johannes Altmanninger f77153e6c8 Disable tmux OSC 133 prompt marking test for some tmux versions < 3.4
OSC 133 was added to tmux 3.4.

Also fix the test on macOS where we do have 3.5a in CI; for some reason we
get copy_cursor_y=6 there.  I didn't investigate yet but at least that's
not the same bug this test was made to fix.
2024-10-12 19:48:26 +02:00

35 lines
800 B
Fish

#RUN: %fish %s
#REQUIRES: command -v tmux && ! tmux -V | grep -qE '^tmux 3\.[0123][a-z]*($|[.-])'
isolated-tmux-start
isolated-tmux send-keys '
function fish_prompt
printf "prompt-line-1\\nprompt-line-2> "
commandline -f repaint
end
' Enter
isolated-tmux send-keys C-l \
': 1' Enter \
': 3' Enter \
': 5' Enter
tmux-sleep
# Screen looks like
# [y=0] prompt-line-1
# [y=1] prompt-line-2> : 1
# [y=2] prompt-line-1
# [y=3] prompt-line-2> : 3
# [y=4] prompt-line-1
# [y=5] prompt-line-2> : 5
# [y=6] prompt-line-1
# [y=7] prompt-line-2>
isolated-tmux copy-mode
isolated-tmux send-keys -X previous-prompt
isolated-tmux send-keys -X previous-prompt
tmux-sleep
isolated-tmux display-message -p '#{copy_cursor_y} #{copy_cursor_line}'
# CHECK: {{[46]}} prompt-line-1