summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-06-16 02:59:50 +0200
committerhut <hut@lavabit.com>2012-06-16 02:59:50 +0200
commitf8dd9d50667a299edefc78f48888d6a32d9bfede (patch)
treef11a2e0aab7cb5cdf405d89c6840ea16d95d2d24
parentc9000fed8f7907284391eb36e2a3138752205830 (diff)
downloadranger-f8dd9d50667a299edefc78f48888d6a32d9bfede.tar.gz
widgets.browsercolumn: fixed crash on resizing to a small width
-rw-r--r--ranger/gui/widgets/browsercolumn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index e0d6bd7f..453ad5a8 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -301,7 +301,7 @@ class BrowserColumn(Pager):
 
 			wtext = WideString(text)
 			if len(wtext) > space:
-				wtext = wtext[:space - 1] + ellipsis
+				wtext = wtext[:max(0, space - 1)] + ellipsis
 			text = str(wtext)
 
 			display_data.append([text, attr])