summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--TODO2
-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
5 files changed, 7 insertions, 4 deletions
diff --git a/TODO b/TODO
index bef08455..f41108be 100644
--- a/TODO
+++ b/TODO
@@ -30,7 +30,7 @@ General
    ( ) #36  10/01/11  help coloring is terribly inefficient
    ( ) #37  10/01/13  better tab completion for OpenConsole
    ( ) #38  10/01/16  searching in pager
-   ( ) #39  10/01/17  flushinput not always good
+   (X) #39  10/01/17  flushinput not always good
    (X) #42  10/01/17  memorize directory for `` when using :cd
    (X) #43  10/01/18  internally treat the bookmarks ` and ' the same
    ( ) #44  10/01/18  more error messages :P
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()
-12-21 21:39:30 +0100 Prepare for layout engine rewrite' href='/ahoang/chawan/commit/src/layout/box.nim?id=0440397664d7561e2dd6e21afc1c1128e3dd45b5'>04403976 ^
8756b053 ^
270628aa ^
77fe3c3e ^

04403976 ^
9fdea97d ^

b6b4e896 ^
9fdea97d ^

95c5438a ^



9fdea97d ^


95c5438a ^
9fdea97d ^




















04403976 ^
39e2ef52 ^





062027c8 ^
9fdea97d ^
7146419b ^
062027c8 ^
ca5aea89 ^
616e60b7 ^
39e2ef52 ^

24e908ef ^


32a94cec ^


1c6ce089 ^
95c5438a ^




062027c8 ^
9fdea97d ^
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95