mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 07:24:51 +08:00
Disable vi-cursor on xterm < 282
Fixes #3499.
@zanchey: This is for integration-2.4.0.
(cherry picked from commit 7ea2dc4488
)
This commit is contained in:
parent
9f23f619c9
commit
7bcae09674
|
@ -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 New Issue
Block a user