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:
ef='#n150'>150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218