summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@hut.pm>2018-01-23 21:31:54 +0100
committerhut <hut@hut.pm>2018-01-23 21:34:33 +0100
commit0a75fdb06980c72a2ed58f65495ab0f02fae2506 (patch)
tree4f650fe19af2cc83a9f68befb215098947d901d1
parentb1e08bf5b52746da2f0e5d9995e8dbc8c8505f62 (diff)
downloadranger-0a75fdb06980c72a2ed58f65495ab0f02fae2506.tar.gz
widgets.view_miller: fix broken pager after changing view mode
Fixes #1035
-rw-r--r--ranger/gui/widgets/view_miller.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/gui/widgets/view_miller.py b/ranger/gui/widgets/view_miller.py
index 1f08e1af..e138ee4b 100644
--- a/ranger/gui/widgets/view_miller.py
+++ b/ranger/gui/widgets/view_miller.py
@@ -26,10 +26,6 @@ class ViewMiller(ViewBase):  # pylint: disable=too-many-ancestors,too-many-insta
         self.preview = True
         self.columns = []
 
-        self.pager = Pager(self.win, embedded=True)
-        self.pager.visible = False
-        self.add_child(self.pager)
-
         self.rebuild()
 
         for option in ('preview_directories', 'preview_files'):
@@ -48,6 +44,10 @@ class ViewMiller(ViewBase):  # pylint: disable=too-many-ancestors,too-many-insta
                 self.remove_child(child)
                 child.destroy()
 
+        self.pager = Pager(self.win, embedded=True)
+        self.pager.visible = False
+        self.add_child(self.pager)
+
         ratios = self.settings.column_ratios
 
         for column in self.columns: