]> Sergey Matveev's repositories - nnn.git/commitdiff
Clear selection after some operations (see notes)
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 15 Jun 2020 13:35:44 +0000 (19:05 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 15 Jun 2020 13:43:08 +0000 (19:13 +0530)
Selection is cleared after successful:
- file removal
- batch rename
- link creation

However, selection is not cleared after:
- archive creation: user may want to delete the files after archiving

src/nnn.c

index af05ca99e2af0b98290f30f3b79c21a09006fac0..16dc527f18c7d555a6d7dc29369bd21540597a0e 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3005,6 +3005,7 @@ static int xlink(char *prefix, char *path, char *curfname, char *buf, int *prese
                psel += len + 1;
        }
 
+       clearselection();
        return count;
 }
 
@@ -5963,6 +5964,7 @@ nochange:
                                        printwait(messages[MSG_FAILED], &presel);
                                        goto nochange;
                                }
+                               clearselection();
                                refresh = TRUE;
                                break;
                        case SEL_HELP: