mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
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.
a45551a535
Cherry-pick Test_cwindow_highlight() from patch v8.1.2040
because it is skipped.
This commit is contained in:
@@ -2692,6 +2692,28 @@ func Test_cwindow_jump()
|
|||||||
set efm&vim
|
set efm&vim
|
||||||
endfunc
|
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)
|
func XvimgrepTests(cchar)
|
||||||
call s:setup_commands(a:cchar)
|
call s:setup_commands(a:cchar)
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
" Tests for startup using utf-8.
|
" Tests for startup using utf-8.
|
||||||
|
|
||||||
|
source check.vim
|
||||||
source shared.vim
|
source shared.vim
|
||||||
source screendump.vim
|
source screendump.vim
|
||||||
|
|
||||||
@@ -73,7 +74,7 @@ func Test_detect_ambiwidth()
|
|||||||
\ 'call test_option_not_set("ambiwidth")',
|
\ 'call test_option_not_set("ambiwidth")',
|
||||||
\ 'redraw',
|
\ 'redraw',
|
||||||
\ ], 'Xscript')
|
\ ], 'Xscript')
|
||||||
let buf = RunVimInTerminal('-S Xscript', {})
|
let buf = RunVimInTerminal('-S Xscript', #{keep_t_u7: 1})
|
||||||
call term_wait(buf)
|
call term_wait(buf)
|
||||||
call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
|
call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
|
||||||
call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})
|
call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})
|
||||||
|
Reference in New Issue
Block a user