Patch 9.0.0092
Problem:    Plugins cannot change v:completed_item.
Solution:   Make v:completed_item writeable. (Shougo Matsushita,
            closes #10801)
Files:      runtime/doc/eval.txt, src/evalvars.c,
            src/testdir/test_ins_complete.vim


*** ../vim-9.0.0091/runtime/doc/eval.txt        2022-06-28 11:21:05.000000000 
+0100
--- runtime/doc/eval.txt        2022-07-27 14:39:14.644649423 +0100
***************
*** 2005,2010 ****
--- 2005,2012 ----
                |Dictionary| containing the |complete-items| for the most
                recently completed word after |CompleteDone|.  The
                |Dictionary| is empty if the completion failed.
+               Note: Plugins can modify the value to emulate the builtin
+               |CompleteDone| event behavior.
  
                                        *v:count* *count-variable*
  v:count               The count given for the last Normal mode command.  Can 
be used
*** ../vim-9.0.0091/src/evalvars.c      2022-07-27 12:30:08.405165929 +0100
--- src/evalvars.c      2022-07-27 14:35:33.625150594 +0100
***************
*** 111,117 ****
      {VV_NAME("oldfiles",       VAR_LIST), &t_list_string, 0},
      {VV_NAME("windowid",       VAR_NUMBER), NULL, VV_RO},
      {VV_NAME("progpath",       VAR_STRING), NULL, VV_RO},
!     {VV_NAME("completed_item",         VAR_DICT), &t_dict_string, VV_RO},
      {VV_NAME("option_new",     VAR_STRING), NULL, VV_RO},
      {VV_NAME("option_old",     VAR_STRING), NULL, VV_RO},
      {VV_NAME("option_oldlocal",        VAR_STRING), NULL, VV_RO},
--- 111,117 ----
      {VV_NAME("oldfiles",       VAR_LIST), &t_list_string, 0},
      {VV_NAME("windowid",       VAR_NUMBER), NULL, VV_RO},
      {VV_NAME("progpath",       VAR_STRING), NULL, VV_RO},
!     {VV_NAME("completed_item",         VAR_DICT), &t_dict_string, 0},
      {VV_NAME("option_new",     VAR_STRING), NULL, VV_RO},
      {VV_NAME("option_old",     VAR_STRING), NULL, VV_RO},
      {VV_NAME("option_oldlocal",        VAR_STRING), NULL, VV_RO},
*** ../vim-9.0.0091/src/testdir/test_ins_complete.vim   2022-07-23 
06:53:01.097648234 +0100
--- src/testdir/test_ins_complete.vim   2022-07-27 14:35:33.625150594 +0100
***************
*** 387,392 ****
--- 387,405 ----
    au! CompleteDone
  endfunc
  
+ func Test_CompleteDone_modify()
+   let value = {
+         \ 'word': '',
+         \ 'abbr': '',
+         \ 'menu': '',
+         \ 'info': '',
+         \ 'kind': '',
+         \ 'user_data': '',
+         \ }
+   let v:completed_item = value
+   call assert_equal(v:completed_item, value)
+ endfunc
+ 
  func CompleteTest(findstart, query)
    if a:findstart
      return col('.')
*** ../vim-9.0.0091/src/version.c       2022-07-27 13:18:10.127091809 +0100
--- src/version.c       2022-07-27 14:36:59.720959938 +0100
***************
*** 737,738 ****
--- 737,740 ----
  {   /* Add new patch number below this line */
+ /**/
+     92,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
150. You find yourself counting emoticons to get to sleep.

 /// 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/20220727134054.870101C0A39%40moolenaar.net.

Raspunde prin e-mail lui