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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201911261606.xAQG6e99017637%40masaka.moolenaar.net.

Raspunde prin e-mail lui