From c831d7fdd8abe37d6f46332f8e4cf8f272f16660 Mon Sep 17 00:00:00 2001 From: "A. Lopes" Date: Thu, 15 Oct 2015 17:15:42 +0100 Subject: Fix for issue #332. Broken file shortening. The filename on the second to last line of the screen is now properly shortened. --- ranger/gui/curses_shortcuts.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py index 187891c6..e7573f17 100644 --- a/ranger/gui/curses_shortcuts.py +++ b/ranger/gui/curses_shortcuts.py @@ -25,20 +25,28 @@ class CursesShortcuts(SettingsAware): """ def addstr(self, *args): + y, x = self.win.getyx() + try: self.win.addstr(*args) except: if len(args) > 1: + self.win.move(y, x) + try: self.win.addstr(*_fix_surrogates(args)) except: pass def addnstr(self, *args): + y, x = self.win.getyx() + try: self.win.addnstr(*args) except: if len(args) > 2: + self.win.move(y, x) + try: self.win.addnstr(*_fix_surrogates(args)) except: -- cgit 1.4.1-2-gfad0