Redraw vi cursor if tmux pane focus changes

Fixes #4788.
This commit is contained in:
Fabian Homborg
2018-03-07 11:06:23 +01:00
parent 1cad15b01f
commit a0fbb8dea7
4 changed files with 25 additions and 6 deletions

View File

@@ -234,6 +234,20 @@ function __fish_config_interactive -d "Initializations that should be performed
__fish_enable_bracketed_paste
end
# Similarly, enable TMUX's focus reporting when in tmux.
# This will be handled by
# - The keybindings (reading the sequence and triggering an event)
# - Any listeners (like the vi-cursor)
if set -q TMUX
function __fish_enable_focus --on-event fish_postexec
echo \e\[\?1004h
end
function __fish_disable_focus --on-event fish_preexec
echo \e\[\?1004l
end
__fish_enable_focus
end
function __fish_winch_handler --on-signal WINCH -d "Repaint screen when window changes size"
commandline -f repaint >/dev/null 2>/dev/null
end