tweaks: reduce the indentation after the previous change
parent
a33b04ce90
commit
3e899b15c2
53
src/winio.c
53
src/winio.c
|
@ -985,40 +985,39 @@ int parse_kbinput(WINDOW *win)
|
||||||
retval = parse_escape_sequence(keycode);
|
retval = parse_escape_sequence(keycode);
|
||||||
meta_key = TRUE;
|
meta_key = TRUE;
|
||||||
} else if ('0' <= keycode && (keycode <= '2' ||
|
} else if ('0' <= keycode && (keycode <= '2' ||
|
||||||
(keycode <= '9' && digit_count > 0))) {
|
(keycode <= '9' && digit_count > 0))) {
|
||||||
/* Two escapes followed by one digit, and no other codes
|
/* Two escapes followed by one digit, and no other codes
|
||||||
* are waiting: byte sequence mode. If the range of the
|
* are waiting: byte sequence mode. If the range of the
|
||||||
* sequence of digits is limited to 2XX, interpret it. */
|
* sequence of digits is limited to 2XX, interpret it. */
|
||||||
int byte = assemble_byte_code(keycode);
|
int byte = assemble_byte_code(keycode);
|
||||||
|
|
||||||
/* If the decimal byte value is not yet complete,
|
/* If the decimal byte value is not yet complete,
|
||||||
* return nothing; otherwise convert it and put the
|
* return nothing; otherwise convert it and put the
|
||||||
* obtained byte(s) back into the input buffer. */
|
* obtained byte(s) back into the input buffer. */
|
||||||
if (byte == PROCEED)
|
if (byte == PROCEED)
|
||||||
return ERR;
|
return ERR;
|
||||||
#ifdef ENABLE_UTF8
|
#ifdef ENABLE_UTF8
|
||||||
else if (byte > 0x7F && using_utf8()) {
|
else if (byte > 0x7F && using_utf8()) {
|
||||||
/* Convert the code to the corresponding Unicode. */
|
/* Convert the code to the corresponding Unicode. */
|
||||||
if (byte < 0xC0) {
|
if (byte < 0xC0) {
|
||||||
put_back((unsigned char)byte);
|
put_back((unsigned char)byte);
|
||||||
put_back(0xC2);
|
put_back(0xC2);
|
||||||
} else {
|
} else {
|
||||||
put_back((unsigned char)(byte - 0x40));
|
put_back((unsigned char)(byte - 0x40));
|
||||||
put_back(0xC3);
|
put_back(0xC3);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
retval = byte;
|
retval = byte;
|
||||||
} else if (digit_count > 0) {
|
} else if (digit_count > 0) {
|
||||||
/* A non-digit in the middle of a byte sequence:
|
/* A non-digit in the middle of a byte sequence... */
|
||||||
* the keycode itself is the result. */
|
retval = keycode;
|
||||||
retval = keycode;
|
|
||||||
} else if (!solitary) {
|
} else if (!solitary) {
|
||||||
meta_key = TRUE;
|
retval = (shifted_metas) ? keycode : tolower(keycode);
|
||||||
retval = (shifted_metas) ? keycode : tolower(keycode);
|
meta_key = TRUE;
|
||||||
} else
|
} else
|
||||||
retval = convert_to_control(keycode);
|
retval = convert_to_control(keycode);
|
||||||
escapes = 0;
|
escapes = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue