summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/displayable.py4
-rw-r--r--ranger/gui/ui.py5
-rw-r--r--ranger/gui/widgets/filelist.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index c4366662..30975064 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -154,8 +154,8 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware):
 				raise OutOfBoundsException("Resizing Failed!")
 
 		self.win.mvderwin(y, x)
-		self.absx = x
-		self.absy = y
+		self.yy, self.xx = self.win.getbegyx()
+		self.absy, self.absx = y, x
 		self.x = 0
 		self.y = 0
 		self.wid = wid
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 20a263ad..91964eb1 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -91,8 +91,9 @@ class UI(DisplayableContainer):
 		except:
 			return
 
-		# from ranger import log
-		# log('{0:0>28b} ({0})'.format(event.bstate))
+#		from ranger import log
+#		log('{0:0>28b} ({0})'.format(event.bstate))
+#		log('y: {0}  x: {1}'.format(event.y, event.x))
 
 		if DisplayableContainer.click(self, event):
 			return
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index 08a95e18..43f3834a 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -33,7 +33,7 @@ class FileList(Widget, DisplayableContainer):
 			pass
 
 		elif self.target.type is T_DIRECTORY:
-			index = self.scroll_begin + event.y - self.y
+			index = self.scroll_begin + event.y - self.yy
 
 			if event.pressed(1):
 				if not self.main_display: