]> Sergey Matveev's repositories - nnn.git/commitdiff
Recall current item on refresh or sorting mode change
authorlostd <lostd@2f30.org>
Sun, 12 Jul 2015 23:56:51 +0000 (00:56 +0100)
committerlostd <lostd@2f30.org>
Sun, 12 Jul 2015 23:56:51 +0000 (00:56 +0100)
noice.c

diff --git a/noice.c b/noice.c
index 228aedfae9618de94cf8f8cdb4cfc96f143da4f2..ba529d6c325509d04b8fe4d8cbdeaeb9a9feba37 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -858,8 +858,14 @@ moretyping:
                        goto begin;
                case SEL_MTIME:
                        mtimeorder = !mtimeorder;
+                       /* Save current */
+                       if (n > 0)
+                               oldpath = makepath(path, dents[cur].name);
                        goto begin;
                case SEL_REDRAW:
+                       /* Save current */
+                       if (n > 0)
+                               oldpath = makepath(path, dents[cur].name);
                        goto begin;
                case SEL_RUN:
                        exitcurses();