]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1417: missing info about register completion in complete_info() v9.1.1417
authorglepnir <glephunter@gmail.com>
Wed, 28 May 2025 18:39:34 +0000 (20:39 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 28 May 2025 18:42:42 +0000 (20:42 +0200)
Problem:  missing info about register completion in complete_info()
          (after v9.1.1408)
Solution: update documentation and mention that register is used as
          source, add a test (glepnir)

closes: #17389

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt
src/testdir/test_ins_complete.vim
src/version.c

index 717f13a6ffe31d3cd4f3f59cacbf4e5881792b18..a15a20aa5cc2381979c82b5e846853b39c0d9da6 100644 (file)
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2025 May 14
+*builtin.txt*  For Vim version 9.1.  Last change: 2025 May 28
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2007,6 +2007,7 @@ complete_info([{what}])                           *complete_info()*
                   "omni"            Omni completion |i_CTRL-X_CTRL-O|
                   "spell"           Spelling suggestions |i_CTRL-X_s|
                   "eval"            |complete()| completion
+                  "register"        Words from registers |i_CTRL-X_CTRL-R|
                   "unknown"         Other internal modes
 
                If the optional {what} list argument is supplied, then only
index 4bb8b40b3c58d4895b0d6d50f9540928e464f752..dfc2189bc481198883a728c05a525edfbf6abc3c 100644 (file)
@@ -4641,6 +4641,9 @@ func Test_register_completion()
   call feedkeys("a\<C-X>\<C-R>\<Esc>", 'tx')
   call assert_equal("zero", getline(1))
 
+  call feedkeys("Sze\<C-X>\<C-R>\<C-R>=string(complete_info(['mode']))\<CR>\<ESC>", "tx")
+  call assert_equal("zero{'mode': 'register'}", getline(1))
+
   " Clean up
   bwipe!
   delfunc GetItems
index 6941380a7d054c0b731348f921655c0f14a322f9..3885bcbee1b28c4c23dff17663dfe3213c1ad73f 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1417,
 /**/
     1416,
 /**/