summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/settings.py1
-rw-r--r--ranger/gui/widgets/browsercolumn.py4
2 files changed, 2 insertions, 3 deletions
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 14ff9bca..7b646744 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -26,6 +26,7 @@ ALLOWED_SETTINGS = {
     'flushinput': bool,
     'hidden_filter': str,
     'idle_delay': int,
+    'line_numbers': bool,
     'max_console_history_size': (int, type(None)),
     'max_history_size': (int, type(None)),
     'metadata_deep_search': bool,
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 12e98386..4de476dc 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -239,8 +239,6 @@ class BrowserColumn(Pager):
 
         copied = [f.path for f in self.fm.copy_buffer]
 
-        linum_mode_is_set = True
-
         # Set the size of the linum text field to the number of digits in the
         # number of files in directory.
         # Setting this to something like the len of (self.scroll_begin +
@@ -299,7 +297,7 @@ class BrowserColumn(Pager):
             space = self.wid
 
             # line number field
-            if linum_mode_is_set:
+            if self.settings.line_numbers:
                 if self.main_column and space - linum_text_len > 2:
                     linum_format = "{0:>" + str(linum_text_len) + "} "
                     line_number_text = linum_format.format(i)