summaryrefslogtreecommitdiff
path: root/src/testdir/test_textprop.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-24 20:41:55 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-24 20:41:55 +0200
commitd79eef2eb1f24b53206c4e55b80a4634f548c429 (patch)
tree7e3363a5b1693bae6c3950987b1d12033511ad54 /src/testdir/test_textprop.vim
parent18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced (diff)
downloadvim-git-d79eef2eb1f24b53206c4e55b80a4634f548c429.tar.gz
patch 8.1.1387: calling prop_add() in an empty buffer doesn't workv8.1.1387
Problem: Calling prop_add() in an empty buffer doesn't work. (Dominique Pelle) Solution: Open the memline before adding a text property. (closes #4412)
Diffstat (limited to 'src/testdir/test_textprop.vim')
-rw-r--r--src/testdir/test_textprop.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 08b93dfc9..4d620eab8 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -752,3 +752,11 @@ func Test_textprop_screenshot_visual()
" Same, but delete four columns
call RunTestVisualBlock(4, '02')
endfunc
+
+" Adding a text property to a new buffer should not fail
+func Test_textprop_empty_buffer()
+ call prop_type_add('comment', {'highlight': 'Search'})
+ new
+ call prop_add(1, 1, {'type': 'comment'})
+ close
+endfunc