tweaks: remove two redundant conditions, and make a more direct return
The escape-parsing routine nowadays returns FOREIGN_SEQUENCE instead of ERR when encountering an unknown sequence. So, with the two cases that demand ERR now handled directly, there is no need to check for ERR any more.master
parent
8249f3560f
commit
7e53fcb581
|
@ -1026,11 +1026,11 @@ int parse_kbinput(WINDOW *win)
|
|||
}
|
||||
escapes = 0;
|
||||
}
|
||||
} else if (keycode == '[' && key_buffer_len > 0 &&
|
||||
(('A' <= *key_buffer && *key_buffer <= 'D') ||
|
||||
('a' <= *key_buffer && *key_buffer <= 'd'))) {
|
||||
} else if (keycode == '[' && (('A' <= *key_buffer && *key_buffer <= 'D') ||
|
||||
('a' <= *key_buffer && *key_buffer <= 'd'))) {
|
||||
/* An iTerm2/Eterm/rxvt sequence: ^[ ^[ [ X. */
|
||||
double_esc = TRUE;
|
||||
return ERR;
|
||||
} else {
|
||||
/* Two escapes followed by a non-escape, and there are more
|
||||
* codes waiting: combined meta and escape sequence mode. */
|
||||
|
@ -1058,9 +1058,6 @@ int parse_kbinput(WINDOW *win)
|
|||
break;
|
||||
}
|
||||
|
||||
if (retval == ERR)
|
||||
return ERR;
|
||||
|
||||
if (retval == controlleft)
|
||||
return CONTROL_LEFT;
|
||||
else if (retval == controlright)
|
||||
|
|
Loading…
Reference in New Issue