Set cursorshape on preexec, reset on post

Fixes #3217.
This commit is contained in:
Fabian Homborg 2016-09-05 01:20:12 +02:00
parent a0623e870b
commit b0716885bc

View file

@ -37,7 +37,7 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
or set -g fish_cursor_unknown block blink
echo "
function fish_vi_cursor_handle --on-variable fish_bind_mode
function fish_vi_cursor_handle --on-variable fish_bind_mode --on-event fish_postexec
set -l varname fish_cursor_\$fish_bind_mode
if not set -q \$varname
set varname fish_cursor_unknown
@ -47,5 +47,17 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
$tmux_postfix
end
" | source
echo "
function fish_vi_cursor_handle_preexec --on-event fish_preexec
set -l varname fish_cursor_default
if not set -q \$varname
set varname fish_cursor_unknown
end
$tmux_prefix
$function \$\$varname
$tmux_postfix
end
" | source
end