diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-09 15:57:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-09 15:57:37 +0200 |
commit | a45551a53557dba98973fdb3ff737dea2fffcda3 (patch) | |
tree | a34164c3e0a464ef9efd194068149e054a2045cf /src/testdir | |
parent | 077a1e670ad69ef4cefc22103ca6635bd269e764 (diff) |
patch 8.2.0936: some terminals misinterpret the code for getting cursor stylev8.2.0936
Problem: Some terminals misinterpret the code for getting cursor style.
Solution: Send a sequence to the terminal and check the result. (IWAMOTO
Kouichi, closes #2126) Merged with current code.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_balloon_eval_term_01.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_balloon_eval_term_01a.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_balloon_eval_term_02.dump | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_terminal_all_ansi_colors.dump | 2 | ||||
-rw-r--r-- | src/testdir/term_util.vim | 10 | ||||
-rw-r--r-- | src/testdir/test_quickfix.vim | 1 | ||||
-rw-r--r-- | src/testdir/test_startup_utf8.vim | 3 | ||||
-rw-r--r-- | src/testdir/test_terminal.vim | 3 |
8 files changed, 15 insertions, 10 deletions
diff --git a/src/testdir/dumps/Test_balloon_eval_term_01.dump b/src/testdir/dumps/Test_balloon_eval_term_01.dump index ab594951fb..9ae7006cee 100644 --- a/src/testdir/dumps/Test_balloon_eval_term_01.dump +++ b/src/testdir/dumps/Test_balloon_eval_term_01.dump @@ -1,5 +1,5 @@ |o+0&#ffffff0|n>e| |o|n|e| |o|n|e| @38 -@2|o| |t|X|o| |t|w|o| @38 +|t|w|o| |t|X|o| |t|w|o| @38 |t|h|r|e| +0#0000001#ffd7ff255@17| +0#0000000#ffffff0@27 |~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6|:| | +0#4040ff13#ffffff0@27 |~| @2| +0#0000001#ffd7ff255|t|X|o| @13| +0#4040ff13#ffffff0@27 diff --git a/src/testdir/dumps/Test_balloon_eval_term_01a.dump b/src/testdir/dumps/Test_balloon_eval_term_01a.dump index ab594951fb..9ae7006cee 100644 --- a/src/testdir/dumps/Test_balloon_eval_term_01a.dump +++ b/src/testdir/dumps/Test_balloon_eval_term_01a.dump @@ -1,5 +1,5 @@ |o+0&#ffffff0|n>e| |o|n|e| |o|n|e| @38 -@2|o| |t|X|o| |t|w|o| @38 +|t|w|o| |t|X|o| |t|w|o| @38 |t|h|r|e| +0#0000001#ffd7ff255@17| +0#0000000#ffffff0@27 |~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6|:| | +0#4040ff13#ffffff0@27 |~| @2| +0#0000001#ffd7ff255|t|X|o| @13| +0#4040ff13#ffffff0@27 diff --git a/src/testdir/dumps/Test_balloon_eval_term_02.dump b/src/testdir/dumps/Test_balloon_eval_term_02.dump index 98532617cd..76a91ae035 100644 --- a/src/testdir/dumps/Test_balloon_eval_term_02.dump +++ b/src/testdir/dumps/Test_balloon_eval_term_02.dump @@ -1,5 +1,5 @@ |o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38 -@2|o| |t|X|o| |t|w|o| @38 +|t|w|o| |t|X|o| |t|w|o| @38 |t|h|r|e|e+0&#e0e0e08| |t|h>r+0&#ffffff0|e@1| |t|h|r|e@1| @32 |~+0#4040ff13&| @2| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@27 |~| @2| +0#0000001#ffd7ff255|l|i|n|e| |3| |c|o|l|u|m|n| |5|:| | +0#4040ff13#ffffff0@27 diff --git a/src/testdir/dumps/Test_terminal_all_ansi_colors.dump b/src/testdir/dumps/Test_terminal_all_ansi_colors.dump index 57a085aa8e..2a0d48153c 100644 --- a/src/testdir/dumps/Test_terminal_all_ansi_colors.dump +++ b/src/testdir/dumps/Test_terminal_all_ansi_colors.dump @@ -1,5 +1,5 @@ >A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0|X+2#e000002&@1|Y+2#40ff4011&@1|Z+2#ff40ff14#e000e06@1| +0#0000000#ffffff0@35 -@2| +0#4040ff13&@72 +|~+0#4040ff13&| @73 |~| @73 |~| @73 |~| @73 diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim index 2d66f38a58..df7cfa54cf 100644 --- a/src/testdir/term_util.vim +++ b/src/testdir/term_util.vim @@ -44,6 +44,8 @@ endfunc " Returns the buffer number of the terminal. " " Options is a dictionary, these items are recognized: +" "keep_t_u7" - when 1 do not make t_u7 empty (resetting t_u7 avoids clearing +" parts of line 2 and 3 on the display) " "rows" - height of the terminal window (max. 20) " "cols" - width of the terminal window (max. 78) " "statusoff" - number of lines the status is offset from default @@ -74,7 +76,13 @@ func RunVimInTerminal(arguments, options) let cols = get(a:options, 'cols', 75) let statusoff = get(a:options, 'statusoff', 1) - let cmd = GetVimCommandCleanTerm() .. a:arguments + if get(a:options, 'keep_t_u7', 0) + let reset_u7 = '' + else + let reset_u7 = ' --cmd "set t_u7=" ' + endif + + let cmd = GetVimCommandCleanTerm() .. reset_u7 .. a:arguments let options = { \ 'curwin': 1, diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 03b374fb10..474b087ae4 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -2710,7 +2710,6 @@ func Test_cwindow_highlight() CheckScreendump let lines =<< trim END - set t_u7= call setline(1, ['some', 'text', 'with', 'matches']) write XCwindow vimgrep e XCwindow diff --git a/src/testdir/test_startup_utf8.vim b/src/testdir/test_startup_utf8.vim index ffbc7935a1..1684d80c80 100644 --- a/src/testdir/test_startup_utf8.vim +++ b/src/testdir/test_startup_utf8.vim @@ -1,5 +1,6 @@ " Tests for startup using utf-8. +source check.vim source shared.vim source screendump.vim @@ -71,7 +72,7 @@ func Test_detect_ambiwidth() \ 'call test_option_not_set("ambiwidth")', \ 'redraw', \ ], 'Xscript') - let buf = RunVimInTerminal('-S Xscript', {}) + let buf = RunVimInTerminal('-S Xscript', #{keep_t_u7: 1}) call TermWait(buf) call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>") call WaitForAssert({-> assert_match('single', term_getline(buf, 1))}) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 7430eb2e0b..bbc6b90ab3 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -2465,7 +2465,6 @@ func Test_terminal_in_popup() call writefile(text, 'Xtext') let cmd = GetVimCommandCleanTerm() let lines = [ - \ 'set t_u7=', \ 'call setline(1, range(20))', \ 'hi PopTerm ctermbg=grey', \ 'func OpenTerm(setColor)', @@ -2545,7 +2544,6 @@ func Test_terminal_in_popup_min_size() END call writefile(text, 'Xtext') let lines = [ - \ 'set t_u7=', \ 'call setline(1, range(20))', \ 'func OpenTerm()', \ " let s:buf = term_start('cat Xtext', #{hidden: 1})", @@ -2575,7 +2573,6 @@ func Terminal_in_popup_colored(group_name, highlight_cmd, highlight_opt) CheckUnix let lines = [ - \ 'set t_u7=', \ 'call setline(1, range(20))', \ 'func OpenTerm()', \ " let s:buf = term_start('cat', #{hidden: 1, " |