diff options
author | Mark Rogalski <interesting.ones.are.already.taken@gmail.com> | 2016-05-16 20:06:34 +0200 |
---|---|---|
committer | Mark Rogalski <interesting.ones.are.already.taken@gmail.com> | 2016-05-16 20:06:34 +0200 |
commit | 6dd0a7373824f42ef9fd159c4608efb31a3c8b91 (patch) | |
tree | 7e7a703da27ea7f85103eafaf90e4813c1b30bc6 | |
parent | 311ecc6cc89c450074a197956b881bc6d613958e (diff) | |
download | ranger-6dd0a7373824f42ef9fd159c4608efb31a3c8b91.tar.gz |
Add a "line_numbers" setting
-rw-r--r-- | ranger/container/settings.py | 1 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 4 |
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) |