comparison 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
comparison
equal deleted inserted replaced
16929:485931978c65 16930:1689b52cf297
1181 \ 'priority' : 50}, 1181 \ 'priority' : 50},
1182 \ {'id' : 3, 'name' : 'sign3', 'lnum' : 11, 'group' : '', 1182 \ {'id' : 3, 'name' : 'sign3', 'lnum' : 11, 'group' : '',
1183 \ 'priority' : 10}], 1183 \ 'priority' : 10}],
1184 \ s[0].signs) 1184 \ s[0].signs)
1185 1185
1186 " Place multiple signs with same id on a line with different priority
1187 call sign_place(1, '', 'sign1', 'Xsign',
1188 \ {'lnum' : 5, 'priority' : 20})
1189 call sign_place(1, '', 'sign2', 'Xsign',
1190 \ {'lnum' : 5, 'priority' : 10})
1191 let s = sign_getplaced('Xsign', {'lnum' : 5})
1192 call assert_equal([
1193 \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
1194 \ 'priority' : 10}],
1195 \ s[0].signs)
1196 call sign_place(1, '', 'sign2', 'Xsign',
1197 \ {'lnum' : 5, 'priority' : 5})
1198 let s = sign_getplaced('Xsign', {'lnum' : 5})
1199 call assert_equal([
1200 \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
1201 \ 'priority' : 5}],
1202 \ s[0].signs)
1203
1186 " Error case 1204 " Error case
1187 call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', 1205 call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
1188 \ [])", 'E715:') 1206 \ [])", 'E715:')
1189 call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign', 1207 call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
1190 \ {'priority' : []})", 'E745:') 1208 \ {'priority' : []})", 'E745:')