After having resized ranger to a height of a single line (which regularly happens due to my use of tmux with heavy pane shuffling), the status bar and command line never go back to their position at the bottom causing drawing glitches (as they are drawn at position 0,0 just as the title bar)..
I tried to trace it with winpdb and .. got that to crash, tOo 馃槄
Seems within gui/displayable.py:resize(), self.win.mvderwin(y, x) fails every time after having resized so small, and self.win.getparyx() always returns 0,0 ...
I assume redraw doesn't fix it? c-l or :redraw_window?
yeah neither :reset nor :redraw_window help..
Hmm, haven't been able to reproduce yet. My terminals on mac os don't allow resizing to a single line! Ah, xterm using xQuartz allowed it. But I still couldn't reproduce, the problem is fixed almost instantly.
Do you use a really barebones terminal or something? st for example?
So I was able to reproduce in and without tmux, on guake (libvte) and xterm.. with TERM={screen,xterm,linux,vt100} ... and I found out that the resizing has to be purely vertical to trigger this. Probably because that will not invoke a status line resize..
cool
fixed it
diff --git ranger/gui/displayable.py ranger/gui/displayable.py
index 16cb275f..1c3fb3e4 100644
--- ranger/gui/displayable.py
+++ ranger/gui/displayable.py
@@ -197,7 +197,11 @@ class Displayable( # pylint: disable=too-many-instance-attributes
try:
self.win.mvderwin(y, x)
except curses.error:
- pass
+ try:
+ self.win.resize(hei, wid)
+ self.win.mvderwin(y, x)
+ except curses.error:
+ pass
self.paryx = self.win.getparyx()
self.y, self.x = self.paryx
Most helpful comment
cool
fixed it