summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--ranger/gui/widgets/browserview.py9
-rw-r--r--ranger/gui/widgets/pager.py3
-rw-r--r--ranger/gui/widgets/taskview.py5
4 files changed, 18 insertions, 1 deletions
diff --git a/TODO b/TODO
index da5e686e..8d8b65f5 100644
--- a/TODO
+++ b/TODO
@@ -24,7 +24,7 @@ General
    (X) #22  10/01/03  add getopt options to change flags/mode
    (X) #29  10/01/06  add chmod command
    (X) #30  10/01/06  add a way to create symlinks
-   ( ) #32  10/01/08  place the (hidden) cursor to a meaningful position
+   (X) #32  10/01/08  place the (hidden) cursor to a meaningful position
    (X) #34  10/01/09  display free disk space
    (X) #35  10/01/09  display disk usage of files in current directory
    ( ) #36  10/01/11  help coloring is terribly inefficient
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 797daa59..f2798ef8 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -67,6 +67,15 @@ class BrowserView(Widget, DisplayableContainer):
 				self.need_redraw = True
 				self.need_clear = False
 			DisplayableContainer.draw(self)
+
+	def finalize(self):
+		if self.pager.visible:
+			self.fm.ui.win.move(self.main_column.y, self.main_column.x)
+		else:
+			x = self.main_column.x
+			y = self.main_column.y + self.main_column.target.pointer\
+					- self.main_column.scroll_begin
+			self.fm.ui.win.move(y, x)
 	
 	def _draw_bookmarks(self):
 		self.need_clear = True
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py
index 52de9ccf..29e96cc3 100644
--- a/ranger/gui/widgets/pager.py
+++ b/ranger/gui/widgets/pager.py
@@ -60,6 +60,9 @@ class Pager(Widget):
 		if self.source and self.source_is_stream:
 			self.source.close()
 	
+	def finalize(self):
+		self.fm.ui.win.move(self.y, self.x)
+	
 	def draw(self):
 		if self.old_source != self.source:
 			self.old_source = self.source
diff --git a/ranger/gui/widgets/taskview.py b/ranger/gui/widgets/taskview.py
index a99a567e..2be61671 100644
--- a/ranger/gui/widgets/taskview.py
+++ b/ranger/gui/widgets/taskview.py
@@ -77,6 +77,11 @@ class TaskView(Widget, Accumulator):
 					self.color_at(1, 0, self.wid, base_clr, 'error')
 
 			self.color_reset()
+	
+	def finalize(self):
+		y = self.y + 1 + self.pointer - self.scroll_begin
+		self.fm.ui.win.move(y, self.x)
+
 
 	def task_remove(self, i=None):
 		if i is None:
215'>215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319