bindings: make ^H rebindable also on NetBSD, FreeBSD and macOS
So that the user can do 'bind ^H cutwordleft all' in their nanorc to make ^H (and sometimes also <Ctrl+Backspace>) delete the word to the left of the cursor while <Backspace> continues to delete just one character.
Этот коммит содержится в:
родитель
65e4784eec
Коммит
e8a5665d2c
@ -462,6 +462,10 @@ int keycode_from_string(const char *keystring)
|
||||
if (keystring[0] == '^') {
|
||||
if (strcasecmp(keystring, "^Space") == 0)
|
||||
return 0;
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||
if (strcasecmp(keystring, "^H") == 0)
|
||||
return KEY_BACKSPACE;
|
||||
#endif
|
||||
if (keystring[1] <= '_' && strlen(keystring) == 2)
|
||||
return keystring[1] - 64;
|
||||
else
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user