mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Disable vi-cursor on xterm < 282
Fixes #3499. @zanchey: This is for integration-2.4.0.
This commit is contained in:
parent
56679d4776
commit
7ea2dc4488
1 changed files with 11 additions and 0 deletions
|
@ -6,6 +6,17 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes'
|
|||
and not set -q TMUX
|
||||
return
|
||||
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 -q terminal[1]
|
||||
or set terminal auto
|
||||
|
|
Loading…
Reference in a new issue