Problem: tests: test_termcodes fails
(after: v9.1.1114)
Solution: adjust the test for the expected termguicolors value
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_terminal_builtin_without_gui waits 2 seconds
Solution: add --not-a-term to remove the annoying 2s delay in error
message when Vim detects that stdio are not from a terminal
(Yee Cheng Chin)
closes: #16635
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim always enables 'termguicolors' in a terminal, even
when not wanted (after v9.1.1054)
Solution: Respect `:set notermguicolors` in vimrc file
fixes: #16538fixes: #16539closes: #16540
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim doesn't work well with TERM=xterm-direct
(Andrea Pappacoda)
Solution: detect if a terminal supports true-colors and
enable termguicolors
The terminfo database for xterm-direct contains both the (non-standard)
termcap RGB capability and a number of colors == 0x1000000 so it seems
either of those two options can be used to detect a terminal capable of
displaying true colors.
So set the termguicolor option automatically, when either of the two
options is detected. (for some reasons, my debian xterm (v393) does not
respond to XTGETTCAP query attempts, so falling back to the number of
colors seems like a good compromize)
fixes: #16327closes: #16490
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: no support for env variables when running Vim in
terminal
Solution: support the "env" argument in RunVimInTerminal(),
close swapfiles properly in test_termcodes,
use CheckFeature in test_termencoding
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: ambiguous mappings not correctly resolved with modifyOtherKeys
Solution: Check for termcode when an upper case mapping is received and
does not match (Oleg Goncharov)
Fix for mapping processing when capital leters are represented with terminal codes.
Problem: there are two mappings and
1) the first mapping is substring of the second,
2) the first non-matching letter is capital,
3) capital letters are represented with termcodes "ESC[27;2;<ascii code>~" in given system
then first mapping is applied instead of second.
Example:
:map B b
:map BBB blimp!
and then
BBB -> bbb
instead of
BBB -> blimp!
Solution: force termcodes check if capital letter does not match.
closes: #15251
Signed-off-by: Oleg Goncharov <goncharovoi@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Code handling low level MS-Windows events cannot be tested.
Solution: Add test_mswin_event() and tests using it. (Christopher Plewright,
closes#11622)
Problem: There is no way to get a list of swap file names.
Solution: Add the swapfilelist() function. Use it in the test script to
clean up. Remove deleting individual swap files.
Problem: When using kitty keyboard protocol function keys may not work.
(Kovid Goyal)
Solution: Recognize CSI ending in [ABCDEFHPQRS] also when the termcap
entries are not specified. (closes#11648)
Problem: Kitty keyboard protocol key not decoded when it has an unsupported
modifier, such as NumLock.
Solution: Accept a key with any modifier. (closes#11638)
Problem: Cannot detect whether modifyOtherKeys is enabled.
Solution: Use XTQMODKEYS introduced by xterm version 377 to request the
modifyOtherKeys level. Update the keycode check results.
Problem: Crash when typing a letter in a terminal window. (Shane-XB-Qian)
Solution: Use the "vterm" variable instead of getting the terminal pointer
from the current buffer. (closes#11608)
Problem: Test for home key fails when 'term' is "tmux".
Solution: Only save termcap entries that exist. Adjust code for xHome to
what xterm uses. (closes#11566)
Problem: Mouse drag test fails.
Solution: Only reset the mouse click flag when actually switching to another
tab page. Disable test that keeps failing.
Problem: Kitty terminal is not recognized.
Solution: Recognize Kitty by the termresponse and then do not set
seenModifyOtherKeys, since Kitty doesn't support that.
(issue #11413)
Problem: Mouse column not correctly used for popup_setpos.
Solution: Adjust off-by-one error and handle Visual line selection properly.
(Yee Cheng Chin, closes#11356)
Problem: Modifiers not simplified when timed out or using feedkeys() with
'n" flag.
Solution: Adjust how mapped flag and timeout are used. (closes#10305)
Problem: When mapping <Esc> terminal codes are not recognized.
Solution: Specifically recognize a mapping with just <Esc> and check for
terminal codes even though there is no partial mapping.
(closes#9903)
Problem: When there is a partially matching map and modifyOtherKeys is
active a full map may not work.
Solution: Only simplify modifiers when there is no matching mapping.
(closes#8792)
Problem: Dec mouse test fails without gnome terminfo entry.
Solution: Check if there is a gnome entry. Also fix 'acd' test on
MS-Windows. (Dominique Pellé, closes#9282)
Problem: In a gnome terminal keys are recognized as mouse events.
Solution: Only recognize DEC mouse events when four numbers are following.
(closes#9256)
Problem: FocusGained does not work when 'ttymouse' is empty.
Solution: Don't use the short mouse code if there is a longer matching code.
(closes#7755) Add a test.
Problem: No way to check for the cmdwin feature, cmdline_hist is now always
enabled.
Solution: Add has('cmdwin') support. Skip arglist test on Windows
temporarily.
Problem: Termcodes test is flaky when used over ssh with X forwarding.
Solution: Set 'mousetime' to a larger value. (Dominique Pellé, closes#7576,
closes#7563)
Problem: CTRL-V U doesn't work to enter a Unicode character when
modifyOtherKeys is effective. (Ken Takata)
Solution: Add a flag to get_literal() for the shift key. (closes#7413)
Problem: Vim9: E1030 error when using empty string for term_sendkeys().
Solution: Don't check for an invalid type unless the terminal can't be
found. (closes#7382)