]> Sergey Matveev's repositories - nnn.git/commitdiff
nuke: open manpages, reload dir after dot
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jan 2020 12:53:46 +0000 (18:23 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jan 2020 12:53:46 +0000 (18:23 +0530)
plugins/nuke
src/nnn.c

index 8883034a0d39a14e0b36a270168f38e7dacf7849..6f08527730ebf5f4b8c2a92947aee26bb7e7a41b 100755 (executable)
@@ -371,6 +371,11 @@ handle_multimedia() {
 handle_mime() {
     mimetype="${1}"
     case "${mimetype}" in
+        ## Manpages
+        text/troff)
+            man -l "${FPATH}"
+            exit 0;;
+
         ## Text
         text/* | */xml)
             vi "${FPATH}"
index 9ef016cc5458c4382f1a267a20b279b9c9a8d97f..699951b44498bce8c0056bf3f52a11a73d4049e4 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4653,6 +4653,7 @@ nochange:
                                        cfg.runplugin = 0;
                                        /* Must be in plugin dir and same context to select plugin */
                                        if ((cfg.runctx == cfg.curctx) && !strcmp(path, plugindir)) {
+                                               endselection();
                                                /* Copy path so we can return back to earlier dir */
                                                xstrlcpy(path, rundir, PATH_MAX);
                                                rundir[0] = '\0';
@@ -4908,9 +4909,12 @@ nochange:
                                break;
                        case SEL_TOGGLEDOT:
                                cfg.showhidden ^= 1;
+                               if (ndents)
+                                       copycurname();
                                if (cfg.filtermode)
                                        presel = FILTER;
-                               break;
+                               clearfilter();
+                               goto begin;
                        case SEL_DETAIL:
                                cfg.showdetail ^= 1;
                                cfg.showdetail ? (printptr = &printent_long) : (printptr = &printent);
@@ -4973,7 +4977,6 @@ nochange:
                                break;
                        }
 
-
                        /* Save current */
                        if (ndents)
                                copycurname();
@@ -5410,6 +5413,7 @@ nochange:
                        }
 
                        if (sel == SEL_PLUGKEY) {
+                               endselection();
                                r = xstrlcpy(g_buf, messages[MSG_PLUGIN_KEYS], CMD_LEN_MAX);
                                printkeys(plug, g_buf + r - 1, PLUGIN_MAX);
                                printprompt(g_buf);