about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-27 04:04:21 +0100
committerhut <hut@lavabit.com>2010-03-27 04:04:21 +0100
commit6099d9a30611e406afd5a257acd4b9bcb6954857 (patch)
tree6e73db30062af77f5696f59e294a72d266b3dde5
parentb4ed18002b30bb7df6e4fd564175b5aa3c523e3c (diff)
downloadranger-6099d9a30611e406afd5a257acd4b9bcb6954857.tar.gz
fixed #74 and closed #67 (was fixed earlier)
-rw-r--r--TODO4
-rw-r--r--ranger/gui/widgets/console.py8
2 files changed, 8 insertions, 4 deletions
diff --git a/TODO b/TODO
index 17991c40..e6dc7f6c 100644
--- a/TODO
+++ b/TODO
@@ -70,10 +70,10 @@ Bugs
    ( ) #60  10/02/05  utf support improvable
    (X) #62  10/02/15  curs_set can raise an exception
    (X) #65  10/02/16  "source ranger ranger some/file.txt" shouldn't cd after exit
-   ( ) #67  10/03/08  terminal title in tty
+   (X) #67  10/03/08  terminal title in tty
    (X) #69  10/03/11  tab-completion breaks with Apps subclass
    ( ) #73  10/03/21  when clicking on the first column, it goes 1x down
-   ( ) #74  10/03/21  console doesn't scroll
+   (X) #74  10/03/21  console doesn't scroll
 
 
 Ideas
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 20a75c4e..0502e624 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -74,12 +74,16 @@ class Console(Widget):
 
 		self.win.erase()
 		self.addstr(0, 0, self.prompt)
-		self.addstr(self.line)
+		overflow = -self.wid + len(self.prompt) + len(self.line) + 1
+		if overflow > 0: 
+			self.addstr(self.line[overflow:])
+		else:
+			self.addstr(self.line)
 
 	def finalize(self):
 		try:
 			self.fm.ui.win.move(self.y,
-					self.x + self.pos + len(self.prompt))
+					self.x + min(self.wid-1, self.pos + len(self.prompt)))
 		except:
 			pass