bindings: force the first letter in a key name to uppercase
So that converting it to a key code remains easy.
This fixes https://savannah.gnu.org/bugs/?57655.
Bug existed since commit 077d307b
from yesterday.
master
parent
ea874112d8
commit
f7a3b996fa
|
@ -719,8 +719,11 @@ void parse_binding(char *ptr, bool dobind)
|
|||
ptr = parse_next_word(ptr);
|
||||
keycopy = copy_of(keyptr);
|
||||
|
||||
/* Force the first character of the key name to uppercase. */
|
||||
keycopy[0] = toupper((unsigned char)keycopy[0]);
|
||||
/* Uppercase either the second or the first character of the key name. */
|
||||
if (keycopy[0] == '^')
|
||||
keycopy[1] = toupper((unsigned char)keycopy[1]);
|
||||
else
|
||||
keycopy[0] = toupper((unsigned char)keycopy[0]);
|
||||
|
||||
/* Verify that the key name is not too short, to allow the next call. */
|
||||
if (keycopy[1] == '\0' || (keycopy[0] == 'M' && keycopy[2] == '\0')) {
|
||||
|
|
Loading…
Reference in New Issue