diff options
Diffstat (limited to 'ranger/gui/curses_shortcuts.py')
-rw-r--r-- | ranger/gui/curses_shortcuts.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py index cf6607b6..43b583a6 100644 --- a/ranger/gui/curses_shortcuts.py +++ b/ranger/gui/curses_shortcuts.py @@ -26,19 +26,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: |