summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-14 00:43:10 +0200
committerhut <hut@lavabit.com>2010-04-14 00:43:10 +0200
commitf99b82c1ae6fc7bc927ad0f216579162574d4fbe (patch)
treeaf59b7b8f30faf14efe444fd0ba2f009f47dad80
parent656c2bf6deb5dfbbd971880154f109ceb2be87c3 (diff)
downloadranger-f99b82c1ae6fc7bc927ad0f216579162574d4fbe.tar.gz
dirarg: cleanup
-rw-r--r--ranger/core/actions.py5
-rw-r--r--ranger/ext/direction.py4
2 files changed, 3 insertions, 6 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index e8634099..15d0d017 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -548,7 +548,6 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		if not narg and not dirarg:
 			selected = (f for f in self.env.get_selection() if f in cwd.files)
 			self.env.copy = set(selected)
-			self.env.cut = False
 		else:
 			direction = Direction(dirarg or {})
 			offset = 0
@@ -559,11 +558,9 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 					override=narg, lst=cwd.files, current=cwd.pointer,
 					pagesize=self.env.termsize[0], offset=offset)
 			self.env.copy = set(selected)
-			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.env.cut = False
 		self.ui.browser.main_column.request_redraw()
 
 	def cut(self, narg=None, dirarg=None):
diff --git a/ranger/ext/direction.py b/ranger/ext/direction.py
index 5a22d553..cefd32bc 100644
--- a/ranger/ext/direction.py
+++ b/ranger/ext/direction.py
@@ -139,6 +139,6 @@ class Direction(dict):
 			current=current, pagesize=pagesize, minimum=0, maximum=len(lst))
 		if destination > current:
 			destination += offset
-			return destination, lst[current:destination]
+			return destination, lst[current:destination + 1]
 		destination -= offset
-		return destination, lst[destination:current]
+		return destination, lst[destination:current + 1]