Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Erase current readline on stop.

  • Loading branch information...
commit ee133a6b1ef8f9eb20243545b456c618440543cb 1 parent ac32c87
@netzpirat netzpirat authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/guard/interactors/readline.rb
View
16 lib/guard/interactors/readline.rb
@@ -45,6 +45,22 @@ def initialize
end
end
+ # Stop the interactor.
+ #
+ def stop
+ # Erase the current line for Ruby Readline
+ if Readline.respond_to?(:refresh_line)
+ Readline.refresh_line
+ end
+
+ # Erase the current line for Rb-Readline
+ if defined?(RbReadline) && RbReadline.rl_outstream
+ RbReadline._rl_erase_entire_line
+ end
+
+ super
+ end
+
# Read a line from stdin with Readline.
#
def read_line
Please sign in to comment.
Something went wrong with that request. Please try again.