1
0
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:
Bram Moolenaar
2018-07-25 22:36:52 +02:00
parent 53901442f3
commit 0a08c63da1
6 changed files with 65 additions and 23 deletions

View File

@@ -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