diff options
author | hut <hut@lavabit.com> | 2010-04-17 20:25:06 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-17 20:25:06 +0200 |
commit | 7213292e490a4f6c73a915d2ea6b834c005dd424 (patch) | |
tree | 936b36b9885d29bb692ea255dfbd3969e4d1a538 | |
parent | 2432c8622c1ff66f62753d1cd9d95508efb276a0 (diff) | |
download | ranger-7213292e490a4f6c73a915d2ea6b834c005dd424.tar.gz |
Added option "max_console_history_size"
-rw-r--r-- | ranger/defaults/options.py | 1 | ||||
-rw-r--r-- | ranger/gui/widgets/console.py | 2 | ||||
-rw-r--r-- | ranger/shared/settings.py | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py index 7c1be4a3..cddd70eb 100644 --- a/ranger/defaults/options.py +++ b/ranger/defaults/options.py @@ -82,6 +82,7 @@ tilde_in_titlebar = True # How many directory-changes or console-commands should be kept in history? max_history_size = 20 +max_console_history_size = 20 # Try to keep so much space between the top/bottom border when scrolling: scroll_offset = 2 diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index 8480ea42..5f45c26f 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -71,7 +71,7 @@ class Console(Widget): self.historypaths = [relpath_conf(x) for x in \ ('history', 'history_search', 'history_qopen', 'history_open')] for i, path in enumerate(self.historypaths): - hist = History(self.settings.max_history_size) + hist = History(self.settings.max_console_history_size) self.histories.append(hist) if ranger.arg.clean: continue try: f = open(path, 'r') diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py index ddc799d2..44b0e55e 100644 --- a/ranger/shared/settings.py +++ b/ranger/shared/settings.py @@ -37,6 +37,7 @@ ALLOWED_SETTINGS = { 'shorten_title': int, # Note: False is an instance of int 'tilde_in_titlebar': bool, 'max_history_size': (int, type(None)), + 'max_console_history_size': (int, type(None)), 'scroll_offset': int, 'preview_files': bool, 'preview_directories': bool, |