From c155acd004d08e0ace244516821bcc5bf4d5f70d Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 27 Oct 2024 04:39:13 +0100 Subject: [PATCH] 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 --- tests/test_functions/isolated-tmux-start.fish | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_functions/isolated-tmux-start.fish b/tests/test_functions/isolated-tmux-start.fish index 2956400ab..21cce5922 100644 --- a/tests/test_functions/isolated-tmux-start.fish +++ b/tests/test_functions/isolated-tmux-start.fish @@ -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