diff --git a/CHANGELOG.rst b/CHANGELOG.rst index af0ceedcc..39444b3f5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -187,6 +187,7 @@ New or improved bindings - ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token which includes escaped spaces (:issue:`2014`). - The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept. - Vi mode has seen some improvements but continues to suffer from the lack of people working on it. + - New default cursor shapes for insert and replace mode. - Insert-mode :kbd:`ctrl-n` accepts autosuggestions (:issue:`10339`). - Outside insert mode, the cursor will no longer be placed beyond the last character on the commandline. - When the cursor is at the end of the commandline, a single :kbd:`l` will accept an autosuggestion (:issue:`10286`). diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish index 196e706ea..7f7c0cac9 100644 --- a/share/functions/fish_vi_cursor.fish +++ b/share/functions/fish_vi_cursor.fish @@ -9,7 +9,15 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' function __fish_vi_cursor --argument-names varname if not set -q $varname - set varname fish_cursor_unknown + switch $varname + case fish_cursor_insert + __fish_cursor_xterm line + case fish_cursor_replace_one fish_cursor_replace + __fish_cursor_xterm underscore + case '*' + __fish_cursor_xterm $fish_cursor_unknown + end + return end __fish_cursor_xterm $$varname end