diff options
author | hut <hut@lavabit.com> | 2010-04-13 17:57:46 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-13 17:57:46 +0200 |
commit | 447cbcd65588eafdb85b407750602c0fdd591ef4 (patch) | |
tree | 22d9bdbe6481a945dba0e57c6f9f2b9639fe0a94 /ranger | |
parent | d492db527bd0a610bef85682615de2c25d5145d6 (diff) | |
download | ranger-447cbcd65588eafdb85b407750602c0fdd591ef4.tar.gz |
dirarg: added unit test and almost working implementaiton
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 7b8d192d..df623c77 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -545,7 +545,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): def copy(self, narg=None, dirarg=None): """Copy the selected items""" direction = Direction(dirarg or {}) - selected = direction.select( + pos, selected = direction.select( override=narg, lst=self.env.cwd.files, current=self.env.cwd.pointer, @@ -553,7 +553,11 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): selected = selected or self.env.get_selection() self.env.copy = set(f for f in selected if f in self.env.cwd.files) + self.env.copy.add(self.env.cwd.pointed_obj) self.env.cut = False + self.env.cwd.pointer = pos + self.env.cwd.correct_pointer() + self.env.copy.add(self.env.cwd.pointed_obj) self.ui.browser.main_column.request_redraw() def cut(self, narg=None, dirarg=None): |