summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorA. Lopes <ajtluser@openmailbox.com>2015-10-15 17:15:42 +0100
committerA. Lopes <ajtluser@openmailbox.com>2015-10-15 17:15:42 +0100
commitc831d7fdd8abe37d6f46332f8e4cf8f272f16660 (patch)
tree244f18f3ddebc710f0d08a4f25984c5547d74c80
parent8a263f02dd3c5b2da4d2ebb0cb0814b9f828cf6c (diff)
downloadranger-c831d7fdd8abe37d6f46332f8e4cf8f272f16660.tar.gz
Fix for issue #332. Broken file shortening.
The filename on the second to last line of the screen is now properly
shortened.
-rw-r--r--ranger/gui/curses_shortcuts.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ranger/gui/curses_shortcuts.py b/ranger/gui/curses_shortcuts.py
index 187891c6..e7573f17 100644
--- a/ranger/gui/curses_shortcuts.py
+++ b/ranger/gui/curses_shortcuts.py
@@ -25,20 +25,28 @@ class CursesShortcuts(SettingsAware):
     """
 
     def addstr(self, *args):
+        y, x = self.win.getyx()
+
         try:
             self.win.addstr(*args)
         except:
             if len(args) > 1:
+                self.win.move(y, x)
+
                 try:
                     self.win.addstr(*_fix_surrogates(args))
                 except:
                     pass
 
     def addnstr(self, *args):
+        y, x = self.win.getyx()
+
         try:
             self.win.addnstr(*args)
         except:
             if len(args) > 2:
+                self.win.move(y, x)
+
                 try:
                     self.win.addnstr(*_fix_surrogates(args))
                 except:
ger/commit/README?h=v1.9.0b5&id=712aa449042e5f9cc66277eeb68fa18b5a0c7d57'>712aa449
240394a4 ^

240394a4 ^
7dc8fef8 ^
9e89f023 ^
36e4e71e ^
20ab9343 ^

20ab9343 ^





4ea0f69a ^

240394a4 ^
7dc8fef8 ^
36e4e71e ^

4a383291 ^
78a7d762 ^
e952d6cb ^
78a7d762 ^
e952d6cb ^
4ea0f69a ^

7838675f ^

07069888 ^

07069888 ^
7838675f ^

1891697f ^
755e7df1 ^
7838675f ^
7dc8fef8 ^
500cf259 ^


7dc8fef8 ^



240394a4 ^



240394a4 ^
7dc8fef8 ^
240394a4 ^




7dc8fef8 ^
240394a4 ^



240394a4 ^

240394a4 ^
7dc8fef8 ^







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