diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-02-08 20:56:02 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-02-08 20:56:02 +0530 |
commit | b23878847e0fb6196858b8ea3fa28269b4a7a91d (patch) | |
tree | f2192a1635411d06bf0e74a2fc0516d6382e2ff4 /src | |
parent | 2f32c32c7b1290e27fd0d51b35aaa93bcb129971 (diff) | |
download | nnn-b23878847e0fb6196858b8ea3fa28269b4a7a91d.tar.gz |
Fix build break
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 59 |
1 files changed, 25 insertions, 34 deletions
@@ -3112,42 +3112,33 @@ nochange: printmsg("unsupported file"); goto nochange; } - case SEL_NEXT: // fallthrough - case SEL_PREV: // fallthrough - case SEL_PGDN: // fallthrough - case SEL_PGUP: // fallthrough - case SEL_HOME: // fallthrough - 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: + case SEL_NEXT: + if (cur < ndents - 1) + ++cur; + else if (ndents) + /* Roll over, set cursor to first entry */ cur = 0; - break; - default: /* case SEL_END */ + break; + case SEL_PREV: + if (cur > 0) + --cur; + else if (ndents) + /* Roll over, set cursor to last entry */ 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; case SEL_CDHOME: // fallthrough case SEL_CDBEGIN: // fallthrough |