diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-12-10 21:06:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-12-10 21:06:22 +0100 |
commit | 8e6a31df81113bbf0e4bb5324a74dc5f6c62a490 (patch) | |
tree | 77b18f0770aef3fabadeb085420af1299b239066 /src/testdir/test_bufwintabinfo.vim | |
parent | 59eb016dff3fd4f764cfe326c80a9b840f0e1a02 (diff) | |
download | vim-git-8e6a31df81113bbf0e4bb5324a74dc5f6c62a490.tar.gz |
patch 8.0.1386: cannot select modified buffers with getbufinfo()v8.0.1386
Problem: Cannot select modified buffers with getbufinfo().
Solution: Add the "bufmodified" flag. (Yegappan Lakshmanan, closes #2431)
Diffstat (limited to 'src/testdir/test_bufwintabinfo.vim')
-rw-r--r-- | src/testdir/test_bufwintabinfo.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim index a592cd7b1..31b465002 100644 --- a/src/testdir/test_bufwintabinfo.vim +++ b/src/testdir/test_bufwintabinfo.vim @@ -20,6 +20,13 @@ function Test_getbufwintabinfo() call assert_equal('vim', l[0].variables.editor) call assert_notequal(-1, index(l[0].windows, bufwinid('%'))) + " Test for getbufinfo() with 'bufmodified' + call assert_equal(0, len(getbufinfo({'bufmodified' : 1}))) + call setbufline('Xtestfile1', 1, ["Line1"]) + let l = getbufinfo({'bufmodified' : 1}) + call assert_equal(1, len(l)) + call assert_equal(bufnr('Xtestfile1'), l[0].bufnr) + if has('signs') call append(0, ['Linux', 'Windows', 'Mac']) sign define Mark text=>> texthl=Search |