about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorEthan Kiang <chocopuff298@gmail.com>2019-10-26 22:09:41 -0400
committertoonn <toonn@toonn.io>2020-11-18 18:38:48 +0100
commit476f9703592259969b1f194ca5924edf9753b87d (patch)
tree85aae1ced7d06c8176c8f8b2af581163e0b6df0e /ranger
parent47b116e1414e7dadeb949e83c3ac75e334e009b1 (diff)
downloadranger-476f9703592259969b1f194ca5924edf9753b87d.tar.gz
Fixed borders drawing over the 1st and last directory
pylint

flake8 errors fixed
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/view_multipane.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/ranger/gui/widgets/view_multipane.py b/ranger/gui/widgets/view_multipane.py
index b2b1fdd3..0ff849c9 100644
--- a/ranger/gui/widgets/view_multipane.py
+++ b/ranger/gui/widgets/view_multipane.py
@@ -45,6 +45,11 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
         self.resize(self.y, self.x, self.hei, self.wid)
 
     def draw(self):
+        if self.need_clear:
+            self.win.erase()
+            self.need_redraw = True
+            self.need_clear = False
+
         ViewBase.draw(self)
 
         if self.settings.draw_borders:
@@ -54,6 +59,12 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
             else:
                 border_types = [draw_borders]
             self._draw_borders(border_types)
+        if self.draw_bookmarks:
+            self._draw_bookmarks()
+        elif self.draw_hints:
+            self._draw_hints()
+        elif self.draw_info:
+            self._draw_info(self.draw_info)
 
     def _draw_borders(self, border_types):
         # Referenced from ranger.gui.widgets.view_miller
@@ -98,11 +109,18 @@ class ViewMultipane(ViewBase):  # pylint: disable=too-many-ancestors
 
     def resize(self, y, x, hei=None, wid=None):
         ViewBase.resize(self, y, x, hei, wid)
+
+        border_type = self.settings.draw_borders.lower()
+        if border_type in ['outline', 'both', 'true']:
+            # 'true' for backwards compat., no height pad needed for 'separators'
+            pad = 1
+        else:
+            pad = 0
         column_width = int((wid - len(self.columns) + 1) / len(self.columns))
         left = 0
         top = 0
         for column in self.columns:
-            column.resize(top, left, hei, max(1, column_width))
+            column.resize(top + pad, left, hei - pad * 2, max(1, column_width))
             left += column_width + 1
             column.need_redraw = True
         self.need_redraw = True