patch 9.1.0752: can set 'cedit' to an invalid value

Problem:  can set cedit to an invalid value
Solution: Check that the value is a valid key name
          (Milly)

closes: #15778

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Milly
2024-10-01 19:30:20 +02:00
committed by Christian Brabandt
parent baee8448d1
commit 25732435c5
4 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2024 Sep 26
*options.txt* For Vim version 9.1. Last change: 2024 Oct 01
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1651,9 +1651,10 @@ A jump table for the options with a short description can be found at |Q_op|.
The default is CTRL-F when 'compatible' is off.
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: >
:exe "set cedit=\<C-Y>"
:exe "set cedit=\<Esc>"
type. The preferred way is to use |key-notation| (e.g. <Up>, <C-F>) or
a letter preceded with a caret (e.g. `^F` is CTRL-F). Examples: >
:set cedit=^Y
:set cedit=<Esc>
< |Nvi| also has this option, but it only uses the first character.
See |cmdwin|.
NOTE: This option is set to the Vim default value when 'compatible'