Fix tmux-multiline-prompt test with EDITOR=vim

This test does "isolated-tmux send-keys Escape" to exit copy mode. When
EDITOR contains "vi", tmux will use Vi keybindings where Escape does
something else ("q" would exit copy mode).

Tests want to have predictable behavior so let's declare the default
emacs key bindings unconditionally.

Fixes #10812
This commit is contained in:
Johannes Altmanninger 2024-10-27 04:39:13 +01:00
parent 2e2765eec0
commit c155acd004

View File

@ -2,9 +2,12 @@ function isolated-tmux-start
set -l tmpdir (mktemp -d)
cd $tmpdir
# macOS lacks the tmux-256color terminfo, use screen-256color instead.
if test (uname) = Darwin
echo 'set -g default-terminal "screen-256color"'
begin
echo 'set -g mode-keys emacs'
# macOS lacks the tmux-256color terminfo, use screen-256color instead.
if test (uname) = Darwin
echo 'set -g default-terminal "screen-256color"'
end
end >./.tmux.conf
function isolated-tmux --inherit-variable tmpdir