]> Sergey Matveev's repositories - nnn.git/commitdiff
Edit also flushes selection
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 16 Nov 2019 15:09:05 +0000 (20:39 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 16 Nov 2019 15:09:05 +0000 (20:39 +0530)
README.md
src/nnn.c

index 5cfca8208f96a8577f5534d3f9470dbab3e901ce..c65beb54fe12a93833acb6fbe926330eb56bbd7c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -210,7 +210,7 @@ The list below is from the **dev branch**. Press <kbd>?</kbd> in `nnn` to see th
             D  File detail   ^R F2  Rename/duplicate
    Space ^J/a  Select entry/all  r  Batch rename
          m ^K  Sel range, clear  M  List selection
-            P  Copy selection    K  Edit selection
+            P  Copy selection    K  Edit, flush sel
             V  Move selection    w  Copy/move sel as
             X  Del selection    ^X  Del entry
             f  Create archive    T  Mount archive
index 5c991e6dda685c70779905f8158431f680557408..946ffd47fe236478e08ea536e5daeb0800754f9b 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1014,6 +1014,7 @@ static bool editselection(void)
 
        nselected = lines;
        writesel(pselbuf, selbufpos - 1);
+       spawn(copier, NULL, NULL, NULL, F_NOTRACE);
 
        return TRUE;
 
@@ -3303,7 +3304,7 @@ static void show_help(const char *path)
                  "cD  File detail   ^R F2  Rename/duplicate\n"
         "3Space ^J/a  Select entry/all  r  Batch rename\n"
               "9m ^K  Sel range, clear  M  List selection\n"
-                 "cP  Copy selection    K  Edit selection\n"
+                 "cP  Copy selection    K  Edit, flush sel\n"
                  "cV  Move selection    w  Copy/move sel as\n"
                  "cX  Del selection    ^X  Del entry\n"
                  "cf  Create archive    T  Mount archive\n"
@@ -4701,8 +4702,8 @@ nochange:
                        //mvprintw(xlines - 1, 0, "+%d\n", r);
                        //xdelay();
 
-                       writesel(pselbuf, selbufpos - 1); /* Truncate NULL from end */
-                       spawn(copier, NULL, NULL, NULL, F_NOTRACE);
+                       //writesel(pselbuf, selbufpos - 1); /* Truncate NULL from end */
+                       //spawn(copier, NULL, NULL, NULL, F_NOTRACE);
                        continue;
                case SEL_SELLST:
                        if (listselbuf() || listselfile()) {