summary refs log tree commit diff stats
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
parent76788499997b7e7bff4cd27b9202aa83e9e39fd0 (diff)
downloadranger-74a4dde385d23e091a21e39b5d779f3169b846ab.tar.gz
gui.widgets.console: clear unicode_buffer when len >= 4
-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")
ision' href='/akspecs/ranger/blame/Makefile?h=v1.6.1&id=bbbd9cb0033bf376eff1001a0edda4a83546eaab'>^
b0a216f5 ^











2c5ea01d ^

b0a216f5 ^


2c5ea01d ^
2c5ea01d ^
2c5ea01d ^
b0a216f5 ^




























94c5d83e ^


1295513f ^
94c5d83e ^
e9e4b4ff ^
b0a216f5 ^


e9e4b4ff ^






e9e4b4ff ^
50a0cb1c ^
e9e4b4ff ^
fde932f2 ^
75682d43 ^
4ade06a6 ^


0c2c782d ^

30ae2137 ^
b0a216f5 ^
4ade06a6 ^
b0a216f5 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109