about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-10-15 21:16:52 +0200
committerhut <hut@lepus.uberspace.de>2014-10-15 21:16:52 +0200
commit74a4dde385d23e091a21e39b5d779f3169b846ab (patch)
treeab5b7404a2ed0c5ffde2c62c193e0ebb6ac1bde2 /ranger
parent76788499997b7e7bff4cd27b9202aa83e9e39fd0 (diff)
downloadranger-74a4dde385d23e091a21e39b5d779f3169b846ab.tar.gz
gui.widgets.console: clear unicode_buffer when len >= 4
Diffstat (limited to 'ranger')
-rw-r--r--ranger/config/rifle.conf1
-rw-r--r--ranger/gui/widgets/console.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf
index c61abfee..4776cdf9 100644
--- a/ranger/config/rifle.conf
+++ b/ranger/config/rifle.conf
@@ -87,6 +87,7 @@ mime ^text,  label pager  = "$PAGER" -- "$@"
 
 ext 1                         = man "$1"
 ext s[wmf]c, has zsnes, X     = zsnes "$1"
+ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
 ext nes, has fceux, X         = fceux "$1"
 ext exe                       = wine "$1"
 name ^[mM]akefile$            = make
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 91366e7c..597be9cd 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -214,6 +214,8 @@ class Console(Widget):
                 return unicode_buffer, line, pos
 
         if self.fm.py3:
+            if len(unicode_buffer) >= 4:
+                unicode_buffer = ""
             unicode_buffer += key
             try:
                 decoded = unicode_buffer.encode("latin-1").decode("utf-8")