summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-19 19:10:32 +0100
committerhut <hut@lavabit.com>2010-01-19 19:10:32 +0100
commitb4934e4221ce6cf72bb8375b8a117caada47f938 (patch)
tree1ce2a3ca7da75bbc3a1d90ce1d7c53b1e1468dc9 /ranger
parent9c2bd85db83c302d03d24045236d0613522be563 (diff)
downloadranger-b4934e4221ce6cf72bb8375b8a117caada47f938.tar.gz
settings: allow to toggle flushinput
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/keys.py3
-rw-r--r--ranger/defaults/options.py1
-rw-r--r--ranger/gui/ui.py3
-rw-r--r--ranger/shared/settings.py2
4 files changed, 6 insertions, 3 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index b11cd85a..194f7746 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -103,9 +103,10 @@ def initialize_commands(command_list):
 
 	# -------------------------------------------------- toggle options
 	hint('t', "show_//h//idden //p//review_files //d//irectories_first " \
-			"//c//ollapse_preview")
+			"//c//ollapse_preview flush//i//nput")
 	bind('th', fm.toggle_boolean_option('show_hidden'))
 	bind('tp', fm.toggle_boolean_option('preview_files'))
+	bind('ti', fm.toggle_boolean_option('flushinput'))
 	bind('td', fm.toggle_boolean_option('directories_first'))
 	bind('tc', fm.toggle_boolean_option('collapse_preview'))
 
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index 236f57a8..254230a4 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -22,6 +22,7 @@ max_history_size = 20
 scroll_offset = 2
 max_dirsize_for_autopreview = None
 preview_files = False
+flushinput = True
 
 sort = 'basename'
 reverse = False
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index c7c4a14b..32ba114e 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -148,7 +148,8 @@ class UI(DisplayableContainer):
 		"""Waits for key input and returns the pressed key"""
 		key = self.win.getch()
 		if key is not -1:
-			curses.flushinp()
+			if self.settings.flushinput:
+				curses.flushinp()
 		return key
 
 	def setup(self):
diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py
index 552154cd..ac024494 100644
--- a/ranger/shared/settings.py
+++ b/ranger/shared/settings.py
@@ -17,7 +17,7 @@ show_hidden scroll_offset
 directories_first sort reverse
 preview_files max_history_size colorscheme
 collapse_preview
-hidden_filter
+hidden_filter flushinput
 max_dirsize_for_autopreview autosave_bookmarks
 apps keys
 """.split()
ger/commit/doc/ranger.ext.accumulator.html?h=v1.4.2&id=f07bb12fc5c59430e995a64956b36331ce3629b9'>f07bb12f ^
b3556b21 ^
f07bb12f ^
















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74