vim-patch:9.1.1428: completion: register completion needs cleanup

Problem:  completion: register completion needs cleanup
Solution: slightly refactor get_register_completion()
          (glepnir)

closes: vim/vim#17432

86d46a7018

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
glepnir
2025-06-04 07:22:39 +08:00
parent eb10852804
commit 97ca92f9dd
2 changed files with 30 additions and 19 deletions

View File

@@ -4751,7 +4751,7 @@ func Test_register_completion()
call feedkeys("Sze\<C-X>\<C-R>\<C-R>=string(complete_info(['mode']))\<CR>\<ESC>", "tx")
call assert_equal("zero{'mode': 'register'}", getline(1))
" Test consecutive CTRL-X CTRL-R (adding mode)Add commentMore actions
" Test consecutive CTRL-X CTRL-R (adding mode)
" First CTRL-X CTRL-R should split into words, second should use full content
let @f = "hello world test complete"
call setline(1, "hel")