Fix build break

This commit is contained in:
Arun Prakash Jana 2019-02-08 20:56:02 +05:30
parent 2f32c32c7b
commit b23878847e
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 25 additions and 34 deletions

View File

@ -3112,42 +3112,33 @@ nochange:
printmsg("unsupported file"); printmsg("unsupported file");
goto nochange; goto nochange;
} }
case SEL_NEXT: // fallthrough case SEL_NEXT:
case SEL_PREV: // fallthrough if (cur < ndents - 1)
case SEL_PGDN: // fallthrough ++cur;
case SEL_PGUP: // fallthrough else if (ndents)
case SEL_HOME: // fallthrough /* Roll over, set cursor to first entry */
case SEL_END:
switch (sel) {
case SEL_NEXT:
if (cur < ndents - 1)
++cur;
else if (ndents)
/* Roll over, set cursor to first entry */
cur = 0;
break;
case SEL_PREV:
if (cur > 0)
--cur;
else if (ndents)
/* Roll over, set cursor to last entry */
cur = ndents - 1;
break;
case SEL_PGDN:
if (cur < ndents - 1)
cur += MIN((LINES - 4) / 2, ndents - 1 - cur);
break;
case SEL_PGUP:
if (cur > 0)
cur -= MIN((LINES - 4) / 2, cur);
break;
case SEL_HOME:
cur = 0; cur = 0;
break; break;
default: /* case SEL_END */ case SEL_PREV:
if (cur > 0)
--cur;
else if (ndents)
/* Roll over, set cursor to last entry */
cur = ndents - 1; cur = ndents - 1;
break; break;
} case SEL_PGDN:
if (cur < ndents - 1)
cur += MIN((LINES - 4) / 2, ndents - 1 - cur);
break;
case SEL_PGUP:
if (cur > 0)
cur -= MIN((LINES - 4) / 2, cur);
break;
case SEL_HOME:
cur = 0;
break;
case SEL_END:
cur = ndents - 1;
break; break;
case SEL_CDHOME: // fallthrough case SEL_CDHOME: // fallthrough
case SEL_CDBEGIN: // fallthrough case SEL_CDBEGIN: // fallthrough