summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index e692eb39..89924dc0 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1219,7 +1219,7 @@ class Actions(FileManagerAware, SettingsAware):
         Copy the selected items.
         Modes are: 'set', 'add', 'remove'.
         """
-        assert mode in ('set', 'add', 'remove')
+        assert mode in ('set', 'add', 'remove', 'toggle')
         cwd = self.thisdir
         if not narg and not dirarg:
             selected = (f for f in self.thistab.get_selection() if f in cwd.files)
@@ -1241,6 +1241,8 @@ class Actions(FileManagerAware, SettingsAware):
             self.copy_buffer.update(set(selected))
         elif mode == 'remove':
             self.copy_buffer.difference_update(set(selected))
+        elif mode == 'toggle':
+            self.copy_buffer.symmetric_difference_update(set(selected))
         self.do_cut = False
         self.ui.browser.main_column.request_redraw()