From bf868e76e14447c7fed0c9a778f2e0ec4cb5011a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 7 Oct 2024 10:22:52 +0800 Subject: vim-patch:9.1.0762: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly (#30704) Problem: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly Solution: improve string_to_key() function in option.c (Milly) - Problem: `^@` raises an error. Solution: Store as ``. - Problem: `` is missing. - Problem: Single `<` or `^` raises an error. It is inconvenient for users. Solution: They are stored as a single character. closes: vim/vim#15811 https://github.com/vim/vim/commit/a9c6f90918d0012d1b8c8c5c1dccb77407f553fb Co-authored-by: Milly --- runtime/doc/options.txt | 7 ++++++- runtime/lua/vim/_meta/options.lua | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 2c2d67c3f0..4248560851 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -7076,7 +7076,12 @@ A jump table for the options with a short description can be found at |Q_op|. Some keys will not work, such as CTRL-C, and Enter. can be used, but hitting it twice in a row will still exit command-line as a failsafe measure. - Although 'wc' is a number option, you can set it to a special key: >vim + Although 'wc' is a number option, it can be specified as a number, a + single character, a |key-notation| (e.g. , ) or a letter + preceded with a caret (e.g. `^F` is CTRL-F): >vim + :set wc=27 + :set wc=X + :set wc=^I set wc= < diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 27384dbccc..2bff777899 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -7699,9 +7699,14 @@ vim.go.ww = vim.go.whichwrap --- Some keys will not work, such as CTRL-C, and Enter. --- can be used, but hitting it twice in a row will still exit --- command-line as a failsafe measure. ---- Although 'wc' is a number option, you can set it to a special key: +--- Although 'wc' is a number option, it can be specified as a number, a +--- single character, a `key-notation` (e.g. , ) or a letter +--- preceded with a caret (e.g. `^F` is CTRL-F): --- --- ```vim +--- :set wc=27 +--- :set wc=X +--- :set wc=^I --- set wc= --- ``` --- -- cgit