aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-23 07:24:02 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-23 07:46:51 -0400
commitc58054c231f11cfd911795b572029e9360835bbb (patch)
tree5a25b022f1c5b1ba8b0c83c876879b3eb700b346 /src/nvim/testdir
parent7e6a2f2bedd47a2a2b3247977ef229c071225f81 (diff)
downloadrneovim-c58054c231f11cfd911795b572029e9360835bbb.tar.gz
rneovim-c58054c231f11cfd911795b572029e9360835bbb.tar.bz2
rneovim-c58054c231f11cfd911795b572029e9360835bbb.zip
vim-patch:8.0.1386: cannot select modified buffers with getbufinfo()
Problem: Cannot select modified buffers with getbufinfo(). Solution: Add the "bufmodified" flag. (Yegappan Lakshmanan, closes vim/vim#2431) https://github.com/vim/vim/commit/8e6a31df81113bbf0e4bb5324a74dc5f6c62a490
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_bufwintabinfo.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_bufwintabinfo.vim b/src/nvim/testdir/test_bufwintabinfo.vim
index a6b4524cc0..d88b061ac7 100644
--- a/src/nvim/testdir/test_bufwintabinfo.vim
+++ b/src/nvim/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