tweaks: mark the two blocks that have a deviant indentation

Also, reshuffle a case, to put the short one first and lose a line.
master
Benno Schulenberg 2018-01-23 18:05:03 +01:00
parent e739448cd0
commit 6795d079b1
1 changed files with 8 additions and 9 deletions

View File

@ -772,7 +772,7 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
switch (seq[1]) { switch (seq[1]) {
case '1': case '1':
if (length > 4 && seq[2] == ';') { if (length > 4 && seq[2] == ';') {
/* <-<-<-<-<-<-<- */
*consumed = 5; *consumed = 5;
switch (seq[3]) { switch (seq[3]) {
case '2': case '2':
@ -806,7 +806,7 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
} }
break; break;
} }
/* ->->->->->->-> */
} }
break; break;
case '2': case '2':
@ -942,7 +942,10 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
*consumed = 3; *consumed = 3;
switch (seq[1]) { switch (seq[1]) {
case '1': case '1':
if (length > 3 && seq[3] == '~') { if (length > 2 && seq[2] == '~')
/* Esc [ 1 ~ == Home on VT320/Linux console. */
return KEY_HOME;
else if (length > 3 && seq[3] == '~') {
*consumed = 4; *consumed = 4;
switch (seq[2]) { switch (seq[2]) {
case '1': /* Esc [ 1 1 ~ == F1 on rxvt/Eterm. */ case '1': /* Esc [ 1 1 ~ == F1 on rxvt/Eterm. */
@ -964,7 +967,7 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
return KEY_F(8); return KEY_F(8);
} }
} else if (length > 4 && seq[2] == ';') { } else if (length > 4 && seq[2] == ';') {
/* <-<-<-<-<-<-<- */
*consumed = 5; *consumed = 5;
switch (seq[3]) { switch (seq[3]) {
case '2': case '2':
@ -1041,11 +1044,7 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
break; break;
#endif #endif
} }
/* ->->->->->->-> */
} else if (length > 2 && seq[2] == '~') {
*consumed = 3;
/* Esc [ 1 ~ == Home on VT320/Linux console. */
return KEY_HOME;
} }
break; break;
case '2': case '2':