Mercurial > vim
diff src/testdir/test_quickfix.vim @ 14397:19d99d9e670c v8.1.0213
patch 8.1.0213: CTRL-W CR does not work properly in a quickfix window
commit https://github.com/vim/vim/commit/0a08c63da17dfd93ac2885e3f3f8a083a9b3131c
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 25 22:36:52 2018 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 25 Jul 2018 22:45:04 +0200 |
parents | 932dde1d8a71 |
children | 9df0fcbfebb2 |
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -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