From f8dd9d50667a299edefc78f48888d6a32d9bfede Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 16 Jun 2012 02:59:50 +0200 Subject: widgets.browsercolumn: fixed crash on resizing to a small width --- ranger/gui/widgets/browsercolumn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) -- cgit 1.4.1-2-gfad0