From 2168d772b864fd05109fb4299e409d4bdc1df39d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 2 Oct 2024 07:39:28 +0800 Subject: vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616) Problem: can set cedit to an invalid value Solution: Check that the value is a valid key name (Milly) closes: vim/vim#15778 https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708 Co-authored-by: Milly --- runtime/lua/vim/_meta/options.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 923d279887..76715e1d9b 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -731,11 +731,12 @@ vim.go.cd = vim.go.cdpath --- The key used in Command-line Mode to open the command-line window. --- Only non-printable keys are allowed. --- The key can be specified as a single character, but it is difficult to ---- type. The preferred way is to use the <> notation. Examples: +--- type. The preferred way is to use `key-notation` (e.g. , ) or +--- a letter preceded with a caret (e.g. `^F` is CTRL-F). Examples: --- --- ```vim ---- exe "set cedit=\\" ---- exe "set cedit=\\" +--- set cedit=^Y +--- set cedit= --- ``` --- `Nvi` also has this option, but it only uses the first character. --- See `cmdwin`. -- cgit