diff options
author | hut <hut@lavabit.com> | 2009-07-18 16:16:28 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-18 16:16:28 +0200 |
commit | 84b68936fee43570696823c554297c27022f9497 (patch) | |
tree | 29030fed189f3941dba61d14e3cc76e20fb06ab9 | |
parent | 2f6881673551c27825355f90914381cfa79dafe0 (diff) | |
download | ranger-84b68936fee43570696823c554297c27022f9497.tar.gz |
clear keybuffer after Action.run()
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | code/action.rb | 1 | ||||
-rw-r--r-- | code/cli.rb | 4 |
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 |