summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-24 01:56:01 +0200
committerhut <hut@lavabit.com>2011-10-24 01:56:01 +0200
commit989013dcb7fcd9ff5d03608283acd8da27ca3238 (patch)
treeb29534ec5b1185581596fee058c79d5dbc8afab2 /ranger
parent98f6125513be5b83814a5b1894014bccd3edd547 (diff)
parent7ab36832af358bc6564e834549166b67927ebc84 (diff)
downloadranger-989013dcb7fcd9ff5d03608283acd8da27ca3238.tar.gz
Merge branch 'stable'
Diffstat (limited to 'ranger')
-rw-r--r--ranger/__init__.py2
-rw-r--r--ranger/gui/curses_shortcuts.py18
-rw-r--r--ranger/gui/widgets/console.py4
3 files changed, 13 insertions, 11 deletions
diff --git a/ranger/__init__.py b/ranger/__init__.py
index 487145b2..df759dc8 100644
--- a/ranger/__init__.py
+++ b/ranger/__init__.py
@@ -25,7 +25,7 @@ import os
 
 # Information
 __license__ = 'GPL3'
-__version__ = '1.5.1'
+__version__ = '1.5.2'
 __author__ = __maintainer__ = 'Roman Zimbelmann'
 __email__ = 'romanz@lavabit.com'
 
diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py
index 4a3bb4b9..10a159a1 100644
--- a/ranger/gui/curses_shortcuts.py
+++ b/ranger/gui/curses_shortcuts.py
@@ -39,19 +39,21 @@ class CursesShortcuts(SettingsAware):
 		try:
 			self.win.addstr(*args)
 		except:
-			try:
-				self.win.addstr(*_fix_surrogates(args))
-			except:
-				pass
+			if len(args) > 1:
+				try:
+					self.win.addstr(*_fix_surrogates(args))
+				except:
+					pass
 
 	def addnstr(self, *args):
 		try:
 			self.win.addnstr(*args)
 		except:
-			try:
-				self.win.addnstr(*_fix_surrogates(args))
-			except:
-				pass
+			if len(args) > 2:
+				try:
+					self.win.addnstr(*_fix_surrogates(args))
+				except:
+					pass
 
 	def addch(self, *args):
 		try:
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 406a2fe9..2376ba5a 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -79,9 +79,9 @@ class Console(Widget):
 		line = WideString(self.line)
 		overflow = -self.wid + len(self.prompt) + len(line) + 1
 		if overflow > 0: 
-			self.addstr(str(line[overflow:]))
+			self.addstr(0, len(self.prompt), str(line[overflow:]))
 		else:
-			self.addstr(self.line)
+			self.addstr(0, len(self.prompt), self.line)
 
 	def finalize(self):
 		try: