1
0
forked from aniani/vim

patch 8.0.1432: after ":copen" can't get the window-ID of the quickfix window

Problem:    After ":copen" can't get the window-ID of the quickfix window.
            (FalacerSelene)
Solution:   Make it work without a quickfix list.  Add a test. (Yegappan
            Lakshmanan, closes #2541)
This commit is contained in:
Bram Moolenaar
2018-01-27 11:52:13 +01:00
parent 0cbcd949e1
commit 2ec364e94d
3 changed files with 31 additions and 14 deletions

View File

@@ -2906,6 +2906,12 @@ func Xgetlist_empty_tests(cchar)
call assert_equal(0, g:Xgetlist({'changedtick' : 0}).changedtick)
call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick': 0}, g:Xgetlist({'all' : 0}))
" Quickfix window with empty stack
silent! Xopen
let qfwinid = (a:cchar == 'c') ? win_getid() : 0
call assert_equal(qfwinid, g:Xgetlist({'winid' : 0}).winid)
Xclose
" Empty quickfix list
Xexpr ""
call assert_equal('', g:Xgetlist({'context' : 0}).context)