about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--TODO4
-rw-r--r--code/action.rb1
-rw-r--r--code/cli.rb4
3 files changed, 7 insertions, 2 deletions
diff --git a/TODO b/TODO
index 52138c5e..dd3d9b12 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
 Critical Bugs
 
-   ( ) #8   09/07/17  Clear keybuffer after executing programs.
+   (X) #8   09/07/17  Clear keybuffer after executing programs.
                you may have typed something after the program stopped reading
                this could flush the text to ranger and result in unwanted actions
 
@@ -47,7 +47,7 @@ Required for next Release
    ( ) #5   09/07/17  avoid using shell calls, it results in many problems
                can't answer questions of spawned processes
                specifically rm with write-protected files
-   ( ) #8   09/07/17  Clear keybuffer after executing programs.
+   (X) #8   09/07/17  Clear keybuffer after executing programs.
                you may have typed something after the program stopped reading
                this could flush the text to ranger and result in unwanted actions
    ( ) #11  09/07/17  specify flags at data/types.rb
diff --git a/code/action.rb b/code/action.rb
index 6e753296..a3986bda 100644
--- a/code/action.rb
+++ b/code/action.rb
@@ -65,6 +65,7 @@ module Action
 		system(*what)
 		wait_for_enter if rc.wait
 		start_interface unless rc.console
+		CLI.clear_keybuffer
 	end
 
 	def wait_for_enter
diff --git a/code/cli.rb b/code/cli.rb
index c5ad48a1..60f74e75 100644
--- a/code/cli.rb
+++ b/code/cli.rb
@@ -47,6 +47,10 @@ module CLI
 		@@mev
 	end
 
+	def clear_keybuffer
+		Ncurses.flushinp
+	end
+
 	def self.included(this)
 		@@window = Ncurses.initscr
 		starti
sion' href='/akkartik/mu/blame/050_write.subx?h=hlt&id=22fb844ba4edf14eb85245a35f42e721658c4f8e'>^
ee9a9237 ^
33352536 ^



6030d7e2 ^
71eb22a5 ^
33352536 ^
71eb22a5 ^
33352536 ^

71eb22a5 ^
33352536 ^

ee9a9237 ^
7dac9ade ^
33352536 ^

6070c23e ^
cf02c20b ^
ee9a9237 ^
33352536 ^



7a583220 ^
33352536 ^

6030d7e2 ^
4224ec81 ^
e59a74ab ^


33352536 ^
7dac9ade ^
e59a74ab ^

ee9a9237 ^
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