summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-01 23:55:55 +0100
committernfnty <git@nfnty.se>2017-02-01 23:56:56 +0100
commit2192e81ae9e435a28874641ce5734e511fb9c974 (patch)
tree2ff7d2c991031a6c0de32a2b14356bad853cb84d
parentf495a97be986236f184b2a4f4edc5b451d409e72 (diff)
downloadranger-2192e81ae9e435a28874641ce5734e511fb9c974.tar.gz
gui.curses_shortcuts: addstr, addnstr: Handle `UnicodeError`
Fixes #787
-rw-r--r--ranger/gui/curses_shortcuts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py
index 3d2b7d18..78aad240 100644
--- a/ranger/gui/curses_shortcuts.py
+++ b/ranger/gui/curses_shortcuts.py
@@ -41,7 +41,7 @@ class CursesShortcuts(SettingsAware):
 
                 try:
                     self.win.addstr(*_fix_surrogates(args))
-                except curses.error:
+                except (curses.error, UnicodeError):
                     pass
 
     def addnstr(self, *args):
@@ -55,7 +55,7 @@ class CursesShortcuts(SettingsAware):
 
                 try:
                     self.win.addnstr(*_fix_surrogates(args))
-                except curses.error:
+                except (curses.error, UnicodeError):
                     pass
 
     def addch(self, *args):