]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build break
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 8 Feb 2019 15:26:02 +0000 (20:56 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 8 Feb 2019 15:26:02 +0000 (20:56 +0530)
src/nnn.c

index 59709c7c5f67ca71b2a63d6b5b9533ac132571b2..c8b79e2eab1d55c59b043c7c98949ab2497aa059 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -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