Patch 8.2.3223
Problem:    Vim: using {} block in autoloade omnifunc fails.
Solution:   Allow using {} block when text is locked. (closes #8631)
Files:      src/ex_cmds.h, src/testdir/test_ins_complete.vim


*** ../vim-8.2.3222/src/ex_cmds.h       2021-06-25 19:29:26.563354256 +0200
--- src/ex_cmds.h       2021-07-25 20:19:21.644788236 +0200
***************
*** 1853,1859 ****
        
EX_RANGE|EX_WHOLEFOLD|EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK|EX_NONWHITE_OK,
        ADDR_LINES),
  EXCMD(CMD_block,      "{",            ex_block,  // not found normally
!       EX_TRLBAR,
        ADDR_NONE),
  EXCMD(CMD_endblock,   "}",            ex_endblock,
        EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
--- 1853,1859 ----
        
EX_RANGE|EX_WHOLEFOLD|EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK|EX_NONWHITE_OK,
        ADDR_LINES),
  EXCMD(CMD_block,      "{",            ex_block,  // not found normally
!       EX_TRLBAR|EX_LOCK_OK,
        ADDR_NONE),
  EXCMD(CMD_endblock,   "}",            ex_endblock,
        EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
*** ../vim-8.2.3222/src/testdir/test_ins_complete.vim   2021-01-29 
21:47:20.485738910 +0100
--- src/testdir/test_ins_complete.vim   2021-07-25 20:24:31.880211377 +0200
***************
*** 121,126 ****
--- 121,157 ----
    set omnifunc=
  endfunc
  
+ func Test_omni_autoload()
+   let save_rtp = &rtp
+   set rtp=Xruntime/some
+   let dir = 'Xruntime/some/autoload'
+   call mkdir(dir, 'p')
+ 
+   let lines =<< trim END
+       vim9script
+       def omni#func(findstart: bool, base: string): any
+           if findstart
+               return 1
+           else
+               return ['match']
+           endif
+       enddef
+       {
+           eval 1 + 2
+       }
+   END
+   call writefile(lines, dir .. '/omni.vim')
+ 
+   new
+   setlocal omnifunc=omni#func
+   call feedkeys("i\<C-X>\<C-O>\<Esc>", 'xt')
+ 
+   bwipe!
+   call delete('Xruntime', 'rf')
+   set omnifunc=
+   let &rtp = save_rtp
+ endfunc
+ 
  func Test_completefunc_args()
    let s:args = []
    func! CompleteFunc(findstart, base)
*** ../vim-8.2.3222/src/version.c       2021-07-25 18:06:44.155292431 +0200
--- src/version.c       2021-07-25 20:26:35.067968657 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3223,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
238. You think faxes are old-fashioned.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/202107251827.16PIRfVL1141529%40masaka.moolenaar.net.

Raspunde prin e-mail lui