]> Sergey Matveev's repositories - nnn.git/commitdiff
Set to last selection if filter is empty
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 14 Jan 2018 08:35:19 +0000 (14:05 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 14 Jan 2018 08:35:19 +0000 (14:05 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index cdabfdee3cd0cf53f4c7612918d583d2a564ef62..a1d5b67760b66a3cdb84646a93b8bb74d270b691 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -1090,9 +1090,7 @@ filterentries(char *path)
 
                                redraw(path);
                                goto end;
-                       case CONTROL('L'):
-                               if (len == 1)
-                                       cur = oldcur; // fallthrough
+                       case CONTROL('L'): // fallthrough
                        case CONTROL('K'): // fallthrough
                        case CONTROL('_'): // fallthrough
                        case CONTROL('R'): // fallthrough
@@ -1102,6 +1100,8 @@ filterentries(char *path)
                        case CONTROL('J'): // fallthrough
                        case CONTROL('X'): // fallthrough
                        case CONTROL('Y'):
+                               if (len == 1)
+                                       cur = oldcur; // fallthrough
                                goto end;
                        default:
                                /* Reset cur in case it's a repeat search */