Disable vi-cursor on xterm < 282

Fixes #3499.

@zanchey: This is for integration-2.4.0.
This commit is contained in:
Fabian Homborg 2016-10-27 10:16:57 +02:00
parent 56679d4776
commit 7ea2dc4488

View file

@ -6,6 +6,17 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
and not set -q TMUX and not set -q TMUX
return return
end end
# XTerm supports this sequence since version 282
if test -n "$XTERM_VERSION"
# This will fail if $XTERM_VERSION is not in the "XTerm($version)" format.
# In that case, we cannot determine the terminal and should stop
# so "[1 q" does not show up on the user's screen
if not test (string replace -r 'XTerm\((\d*)\)' '$1' -- $XTERM_VERSION) -ge 282
return
end
end
set -l terminal $argv[1] set -l terminal $argv[1]
set -q terminal[1] set -q terminal[1]
or set terminal auto or set terminal auto