diff options
-rw-r--r-- | ranger/gui/curses_shortcuts.py | 5 | ||||
-rw-r--r-- | ranger/gui/widgets/browserview.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py index bc07f837..e75205d6 100644 --- a/ranger/gui/curses_shortcuts.py +++ b/ranger/gui/curses_shortcuts.py @@ -4,10 +4,13 @@ import curses import _curses +import sys from ranger.gui.color import get_color from ranger.core.shared import SettingsAware +REVERSE_ADDCH_ARGS = sys.version[0:5] == '3.4.0' + def _fix_surrogates(args): return [isinstance(arg, str) and arg.encode('utf-8', 'surrogateescape') .decode('utf-8', 'replace') or arg for arg in args] @@ -43,6 +46,8 @@ class CursesShortcuts(SettingsAware): pass def addch(self, *args): + if REVERSE_ADDCH_ARGS and len(args) >= 3: + args = [args[1], args[0]] + list(args[2:]) try: self.win.addch(*args) except: diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index 1f2dd457..618d15a8 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -163,8 +163,8 @@ class BrowserView(Widget, DisplayableContainer): y = self.hei - 1 try: win.vline(1, x, curses.ACS_VLINE, y - 1) - win.addch(0, x, curses.ACS_TTEE, 0) - win.addch(y, x, curses.ACS_BTEE, 0) + self.addch(0, x, curses.ACS_TTEE, 0) + self.addch(y, x, curses.ACS_BTEE, 0) except: # in case it's off the boundaries pass |