To: vim_dev@googlegroups.com Subject: Patch 8.1.2349 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2349 Problem: :lockvar and :unlockvar cannot be followed by "| endif". Solution: Check for following commands. (closes #5269) Files: src/testdir/test_const.vim, src/ex_docmd.c *** ../vim-8.1.2348/src/testdir/test_const.vim 2019-11-26 16:50:27.300851212 +0100 --- src/testdir/test_const.vim 2019-11-26 16:59:34.594599713 +0100 *************** *** 203,208 **** --- 203,222 ---- call assert_equal(0, x) endfunc + func Test_lockvar() + let x = 'hello' + lockvar x + call assert_fails('let x = "there"', 'E741') + if 0 | unlockvar x | endif + call assert_fails('let x = "there"', 'E741') + unlockvar x + let x = 'there' + + if 0 | lockvar x | endif + let x = 'again' + endfunc + + func Test_const_with_index_access() let l = [1, 2, 3] call assert_fails('const l[0] = 4', 'E996:') *** ../vim-8.1.2348/src/ex_docmd.c 2019-11-26 16:50:27.300851212 +0100 --- src/ex_docmd.c 2019-11-26 17:00:26.870358434 +0100 *************** *** 2384,2389 **** --- 2384,2390 ---- case CMD_leftabove: case CMD_let: case CMD_lockmarks: + case CMD_lockvar: case CMD_lua: case CMD_match: case CMD_mzscheme: *************** *** 2408,2413 **** --- 2409,2415 ---- case CMD_tilde: case CMD_topleft: case CMD_unlet: + case CMD_unlockvar: case CMD_verbose: case CMD_vertical: case CMD_wincmd: *** ../vim-8.1.2348/src/version.c 2019-11-26 16:50:27.304851196 +0100 --- src/version.c 2019-11-26 17:01:01.874197794 +0100 *************** *** 739,740 **** --- 739,742 ---- { /* Add new patch number below this line */ + /**/ + 2349, /**/ -- You cannot have a baby in one month by getting nine women pregnant. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///