summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorMark Rogalski <interesting.ones.are.already.taken@gmail.com>2016-05-16 20:06:34 +0200
committerMark Rogalski <interesting.ones.are.already.taken@gmail.com>2016-05-16 20:06:34 +0200
commit6dd0a7373824f42ef9fd159c4608efb31a3c8b91 (patch)
tree7e7a703da27ea7f85103eafaf90e4813c1b30bc6 /ranger
parent311ecc6cc89c450074a197956b881bc6d613958e (diff)
downloadranger-6dd0a7373824f42ef9fd159c4608efb31a3c8b91.tar.gz
Add a "line_numbers" setting
Diffstat (limited to 'ranger')
-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)