forked from aniani/vim
patch 8.1.0213: CTRL-W CR does not work properly in a quickfix window
Problem: CTRL-W CR does not work properly in a quickfix window. Solution: Split the window if needed. (Jason Franklin)
This commit is contained in:
@@ -3504,3 +3504,21 @@ func Test_filter_clist()
|
||||
call assert_equal([' 1 abc:pat1: '],
|
||||
\ split(execute('filter /pat1/ clist'), "\n"))
|
||||
endfunc
|
||||
|
||||
" Tests for the "CTRL-W <CR>" command.
|
||||
func Xview_result_split_tests(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
" Test that "CTRL-W <CR>" in a qf/ll window fails with empty list.
|
||||
call g:Xsetlist([])
|
||||
Xopen
|
||||
let l:win_count = winnr('$')
|
||||
call assert_fails('execute "normal! \<C-W>\<CR>"', 'E42')
|
||||
call assert_equal(l:win_count, winnr('$'))
|
||||
Xclose
|
||||
endfunc
|
||||
|
||||
func Test_view_result_split()
|
||||
call Xview_result_split_tests('c')
|
||||
call Xview_result_split_tests('l')
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user