Mercurial > vim
diff src/testdir/test_signs.vim @ 16930:1689b52cf297 v8.1.1466
patch 8.1.1466: not updating priority on existing sign
commit https://github.com/vim/vim/commit/58a7f87c8653b4cb5b0794b6b88e2ec140d3d2c3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 4 22:48:15 2019 +0200
patch 8.1.1466: not updating priority on existing sign
Problem: Not updating priority on existing sign.
Solution: Set the sign priority. Add a test. (Yegappan Lakshmanan)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Jun 2019 23:00:06 +0200 |
parents | 9e0154efac3a |
children | 15bc5a64bd50 |
line wrap: on
line diff
--- a/src/testdir/test_signs.vim +++ b/src/testdir/test_signs.vim @@ -1183,6 +1183,24 @@ func Test_sign_priority() \ 'priority' : 10}], \ s[0].signs) + " Place multiple signs with same id on a line with different priority + call sign_place(1, '', 'sign1', 'Xsign', + \ {'lnum' : 5, 'priority' : 20}) + call sign_place(1, '', 'sign2', 'Xsign', + \ {'lnum' : 5, 'priority' : 10}) + let s = sign_getplaced('Xsign', {'lnum' : 5}) + call assert_equal([ + \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '', + \ 'priority' : 10}], + \ s[0].signs) + call sign_place(1, '', 'sign2', 'Xsign', + \ {'lnum' : 5, 'priority' : 5}) + let s = sign_getplaced('Xsign', {'lnum' : 5}) + call assert_equal([ + \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '', + \ 'priority' : 5}], + \ s[0].signs) + " Error case call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', \ [])", 'E715:')