diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-14 13:15:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-14 13:15:24 +0100 |
commit | 2ce7790348dab9cbfcc5d02c8258d0dd7ecacf95 (patch) | |
tree | 5be6cfa06851d67bf83d3250885adcc7ba92bb01 /src/testdir/test_quickfix.vim | |
parent | 8496c9eadbf4ea3bf69e2e01456831eee2bddf0a (diff) | |
download | vim-git-2ce7790348dab9cbfcc5d02c8258d0dd7ecacf95.tar.gz |
patch 8.2.1982: quickfix window now updated when adding invalid entriesv8.2.1982
Problem: Quickfix window now updated when adding invalid entries.
Solution: Update the quickfix buffer properly. (Yegappan Lakshmanan, closes
#7291, closes #7271)
Diffstat (limited to 'src/testdir/test_quickfix.vim')
-rw-r--r-- | src/testdir/test_quickfix.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index 196aa1d8d..395ecc6e1 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -5145,4 +5145,17 @@ func Test_setloclist_crash() %bw! endfunc +" Test for adding an invalid entry with the quickfix window open and making +" sure that the window contents are not changed +func Test_add_invalid_entry_with_qf_window() + call setqflist([], 'f') + cexpr "Xfile1:10:aa" + copen + call setqflist(['bb'], 'a') + call assert_equal(1, line('$')) + call assert_equal(['Xfile1|10| aa'], getline(1, '$')) + call assert_equal([{'lnum': 10, 'bufnr': bufnr('Xfile1'), 'col': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'aa'}], getqflist()) + cclose +endfunc + " vim: shiftwidth=2 sts=2 expandtab |