mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
revert #652
reverting broad cosmetic/style change because: - increases merge-conflicts - increases overhead of merging upstream Vim patches - reasons for change are ambiguous, so default to no change
This commit is contained in:
20
src/keymap.c
20
src/keymap.c
@@ -29,7 +29,7 @@ static struct modmasktable {
|
||||
{MOD_MASK_MULTI_CLICK, MOD_MASK_4CLICK, (char_u)'4'},
|
||||
/* 'A' must be the last one */
|
||||
{MOD_MASK_ALT, MOD_MASK_ALT, (char_u)'A'},
|
||||
{0, 0, '\0'}
|
||||
{0, 0, NUL}
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -125,7 +125,7 @@ static char_u modifier_keys_table[] =
|
||||
/* TAB pseudo code*/
|
||||
MOD_MASK_SHIFT, 'k', 'B', KS_EXTRA, (int)KE_TAB,
|
||||
|
||||
'\0'
|
||||
NUL
|
||||
};
|
||||
|
||||
static struct key_name_entry {
|
||||
@@ -349,7 +349,7 @@ int simplify_key(int key, int *modifiers)
|
||||
}
|
||||
key0 = KEY2TERMCAP0(key);
|
||||
key1 = KEY2TERMCAP1(key);
|
||||
for (i = 0; modifier_keys_table[i] != '\0'; i += MOD_KEYS_ENTRY_SIZE)
|
||||
for (i = 0; modifier_keys_table[i] != NUL; i += MOD_KEYS_ENTRY_SIZE)
|
||||
if (key0 == modifier_keys_table[i + 3]
|
||||
&& key1 == modifier_keys_table[i + 4]
|
||||
&& (*modifiers & modifier_keys_table[i])) {
|
||||
@@ -477,7 +477,7 @@ char_u *get_special_key_name(int c, int modifiers)
|
||||
idx = (int)STRLEN(string);
|
||||
}
|
||||
string[idx++] = '>';
|
||||
string[idx] = '\0';
|
||||
string[idx] = NUL;
|
||||
return string;
|
||||
}
|
||||
|
||||
@@ -555,7 +555,7 @@ find_special_key (
|
||||
for (bp = src + 1; *bp == '-' || vim_isIDc(*bp); bp++) {
|
||||
if (*bp == '-') {
|
||||
last_dash = bp;
|
||||
if (bp[1] != '\0') {
|
||||
if (bp[1] != NUL) {
|
||||
if (has_mbyte)
|
||||
l = mb_ptr2len(bp + 1);
|
||||
else
|
||||
@@ -617,7 +617,7 @@ find_special_key (
|
||||
* get_special_key_code() may return NUL for invalid
|
||||
* special key name.
|
||||
*/
|
||||
if (key != '\0') {
|
||||
if (key != NUL) {
|
||||
/*
|
||||
* Only use a modifier when there is no special key code that
|
||||
* includes the modifier.
|
||||
@@ -711,19 +711,19 @@ int get_special_key_code(char_u *name)
|
||||
/*
|
||||
* If it's <t_xx> we get the code for xx from the termcap
|
||||
*/
|
||||
if (name[0] == 't' && name[1] == '_' && name[2] != '\0' && name[3] != '\0') {
|
||||
if (name[0] == 't' && name[1] == '_' && name[2] != NUL && name[3] != NUL) {
|
||||
string[0] = name[2];
|
||||
string[1] = name[3];
|
||||
string[2] = '\0';
|
||||
string[2] = NUL;
|
||||
if (add_termcap_entry(string, FALSE) == OK)
|
||||
return TERMCAP2KEY(name[2], name[3]);
|
||||
} else
|
||||
for (i = 0; key_names_table[i].name != NULL; i++) {
|
||||
table_name = key_names_table[i].name;
|
||||
for (j = 0; vim_isIDc(name[j]) && table_name[j] != '\0'; j++)
|
||||
for (j = 0; vim_isIDc(name[j]) && table_name[j] != NUL; j++)
|
||||
if (TOLOWER_ASC(table_name[j]) != TOLOWER_ASC(name[j]))
|
||||
break;
|
||||
if (!vim_isIDc(name[j]) && table_name[j] == '\0')
|
||||
if (!vim_isIDc(name[j]) && table_name[j] == NUL)
|
||||
return key_names_table[i].key;
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user