Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 12465:805f7fd40e0d v8.0.1112
patch 8.0.1112: can't get size or current index from quickfix list
commit https://github.com/vim/vim/commit/fc2b270cfd36230166df486aae4d96d9d1f32755
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 15 22:43:07 2017 +0200
patch 8.0.1112: can't get size or current index from quickfix list
Problem: Can't get size or current index from quickfix list.
Solution: Add "idx" and "size" options. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 15 Sep 2017 22:45:04 +0200 |
parents | fc3e2d5614dd |
children | 03a6aeea2096 |
comparison
equal
deleted
inserted
replaced
12464:ab743b602cd7 | 12465:805f7fd40e0d |
---|---|
428 Xexpr "" | 428 Xexpr "" |
429 call assert_fails('Xnext', 'E42:') | 429 call assert_fails('Xnext', 'E42:') |
430 | 430 |
431 call delete('Xqftestfile1') | 431 call delete('Xqftestfile1') |
432 call delete('Xqftestfile2') | 432 call delete('Xqftestfile2') |
433 | |
434 " Should be able to use next/prev with invalid entries | |
435 Xexpr "" | |
436 call assert_equal(0, g:Xgetlist({'idx' : 0}).idx) | |
437 call assert_equal(0, g:Xgetlist({'size' : 0}).size) | |
438 Xaddexpr ['foo', 'bar', 'baz', 'quux', 'shmoo'] | |
439 call assert_equal(5, g:Xgetlist({'size' : 0}).size) | |
440 Xlast | |
441 call assert_equal(5, g:Xgetlist({'idx' : 0}).idx) | |
442 Xfirst | |
443 call assert_equal(1, g:Xgetlist({'idx' : 0}).idx) | |
444 2Xnext | |
445 call assert_equal(3, g:Xgetlist({'idx' : 0}).idx) | |
433 endfunc | 446 endfunc |
434 | 447 |
435 func Test_browse() | 448 func Test_browse() |
436 call Xtest_browse('c') | 449 call Xtest_browse('c') |
437 call Xtest_browse('l') | 450 call Xtest_browse('l') |