aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-13 12:26:34 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-13 12:34:23 -0400
commitac18e26f574e7633184b1785852107c3ee9cf9a1 (patch)
tree7d3b98c31b4231619edd6b16f2f4da051441ddb7 /src
parent8b812183002ec869b20ae33ee7ec52452470fc52 (diff)
downloadrneovim-ac18e26f574e7633184b1785852107c3ee9cf9a1.tar.gz
rneovim-ac18e26f574e7633184b1785852107c3ee9cf9a1.tar.bz2
rneovim-ac18e26f574e7633184b1785852107c3ee9cf9a1.zip
vim-patch:8.2.0936: some terminals misinterpret the code for getting cursor style
Problem: Some terminals misinterpret the code for getting cursor style. Solution: Send a sequence to the terminal and check the result. (IWAMOTO Kouichi, closes vim/vim#2126) Merged with current code. https://github.com/vim/vim/commit/a45551a53557dba98973fdb3ff737dea2fffcda3 Cherry-pick Test_cwindow_highlight() from patch v8.1.2040 because it is skipped.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_quickfix.vim22
-rw-r--r--src/nvim/testdir/test_startup_utf8.vim3
2 files changed, 24 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index bf15f7f52b..14240f0d5f 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -2692,6 +2692,28 @@ func Test_cwindow_jump()
set efm&vim
endfunc
+func Test_cwindow_highlight()
+ CheckScreendump
+
+ let lines =<< trim END
+ call setline(1, ['some', 'text', 'with', 'matches'])
+ write XCwindow
+ vimgrep e XCwindow
+ redraw
+ cwindow 4
+ END
+ call writefile(lines, 'XtestCwindow')
+ let buf = RunVimInTerminal('-S XtestCwindow', #{rows: 12})
+ call VerifyScreenDump(buf, 'Test_quickfix_cwindow_1', {})
+ call term_sendkeys(buf, ":cnext\<CR>")
+ call VerifyScreenDump(buf, 'Test_quickfix_cwindow_2', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestCwindow')
+ call delete('XCwindow')
+endfunc
+
func XvimgrepTests(cchar)
call s:setup_commands(a:cchar)
diff --git a/src/nvim/testdir/test_startup_utf8.vim b/src/nvim/testdir/test_startup_utf8.vim
index 1b3d2184a0..bb4304396e 100644
--- a/src/nvim/testdir/test_startup_utf8.vim
+++ b/src/nvim/testdir/test_startup_utf8.vim
@@ -1,5 +1,6 @@
" Tests for startup using utf-8.
+source check.vim
source shared.vim
source screendump.vim
@@ -73,7 +74,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 term_wait(buf)
call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})