diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bdbfa83e5..6d9466c73 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,12 +1,17 @@ fish 3.5.1 (released ???) ==================================== -This release of fish fixes a number of problems identified in fish 3.5.0. +This release of fish introduces the following small enhancements: + +- Cursor shaping for Vi mode is enabled by default in tmux, and will be used if the outer terminal is capable (:issue:`8981`). + +This release also fixes a number of problems identified in fish 3.5.0. - Completing ``git blame`` or ``git -C`` works correctly (:issue:`9053`). - On terminals that emit a ``CSI u`` sequence for :kbd:`Shift-Space`, fish inserts a space instead of printing an error. (:issue:`9054`). - ``status fish-path`` on Linux-based platforms could print the path with a " (deleted)" suffix (such as ``/usr/bin/fish (deleted)``), which is now removed (:issue:`9019`). + -------------- fish 3.5.0 (released June 16, 2022) diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish index 8ed5c5398..5f6c8b4a7 100644 --- a/share/functions/fish_vi_cursor.fish +++ b/share/functions/fish_vi_cursor.fish @@ -37,9 +37,6 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' # - It is set for xterm, and everyone and their dog claims to be xterm # # So we just don't care about $TERM, unless it is one of the few terminals that actually have their own entry. - # - # Note: Previous versions also checked $TMUX, and made sure that then $TERM was screen* or tmux*. - # We don't care, since we *cannot* handle term-in-a-terms 100% correctly. if not set -q KONSOLE_PROFILE_NAME and not test -n "$KONSOLE_VERSION" -a "$KONSOLE_VERSION" -ge 200400 # konsole, but new. and not set -q ITERM_PROFILE @@ -52,6 +49,10 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' and not string match -q 'rxvt*' -- $TERM and not string match -q 'alacritty*' -- $TERM and not string match -q 'foot*' -- $TERM + and not begin + set -q TMUX + and string match -qr '^screen|^tmux' -- $TERM + end return end end @@ -78,13 +79,6 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' set function __fish_cursor_xterm end - set -l tmux_prefix - set -l tmux_postfix - if set -q TMUX - set tmux_prefix echo -ne "'\ePtmux;\e'" - set tmux_postfix echo -ne "'\e\\\\'" - end - set -q fish_cursor_unknown or set -g fish_cursor_unknown block @@ -94,9 +88,7 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' if not set -q \$varname set varname fish_cursor_unknown end - $tmux_prefix $function \$\$varname - $tmux_postfix end " | source @@ -106,9 +98,7 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' if not set -q \$varname set varname fish_cursor_unknown end - $tmux_prefix $function \$\$varname - $tmux_postfix end " | source end