diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-06 05:50:44 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-06-06 06:07:31 +0800 |
commit | 1d4e894403638a94ac58766cdcbc7f3128db318b (patch) | |
tree | bfd2791623c56bb106f61286d3cb7a855e126355 /runtime | |
parent | c235a063d6ead447f13076be50ddd9fae6223913 (diff) | |
download | rneovim-1d4e894403638a94ac58766cdcbc7f3128db318b.tar.gz rneovim-1d4e894403638a94ac58766cdcbc7f3128db318b.tar.bz2 rneovim-1d4e894403638a94ac58766cdcbc7f3128db318b.zip |
vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem: Cannot have buffer-local value for 'completeopt'
(Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).
Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.
fixes: vim/vim#5487
closes: vim/vim#14922
https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/options.lua | 2 | ||||
-rw-r--r-- | runtime/optwin.vim | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index c33b8ac03c..f02d3c9741 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1495,7 +1495,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'completeopt'* *'cot'* 'completeopt' 'cot' string (default "menu,preview") - global + global or local to buffer |global-local| A comma-separated list of options for Insert mode completion |ins-completion|. The supported values are: diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 0b4294ae4b..155c93726b 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1084,6 +1084,8 @@ vim.bo.cfu = vim.bo.completefunc --- @type string vim.o.completeopt = "menu,preview" vim.o.cot = vim.o.completeopt +vim.bo.completeopt = vim.o.completeopt +vim.bo.cot = vim.bo.completeopt vim.go.completeopt = vim.o.completeopt vim.go.cot = vim.go.completeopt diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 5b5b33e4ad..3b874f4cda 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: The Vim Project <https://github.com/vim/vim> -" Last Change: 2023 Aug 31 +" Last Change: 2024 Jun 05 " Former Maintainer: Bram Moolenaar <Bram@vim.org> " If there already is an option window, jump to that one. @@ -723,7 +723,7 @@ if has("insert_expand") call append("$", "\t" .. s:local_to_buffer) call <SID>OptionL("cpt") call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion")) - call <SID>OptionG("cot", &cot) + call <SID>OptionL("cot") call <SID>AddOption("pumheight", gettext("maximum height of the popup menu")) call <SID>OptionG("ph", &ph) call <SID>AddOption("pumwidth", gettext("minimum width of the popup menu")) |