Permalink
Browse files

Revert "Added a config.async option."

This reverts commit 10924b1.
  • Loading branch information...
1 parent 10924b1 commit 935745e5a873ac1528c07bb0c81d4dd2b93f5c30 @jugyo committed Aug 10, 2009
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/termtter/client.rb
View
@@ -21,7 +21,6 @@ module Client
config.set_default(:update_interval, 300)
config.set_default(:prompt, '> ')
config.set_default(:devel, false)
- config.set_default(:async, false)
Thread.abort_on_exception = true
@@ -192,14 +191,13 @@ def call_hooks(point, *args)
end
def call_commands(text)
- invoke_method = config.async ? :invoke_later : :invoke_and_wait
- @task_manager.send(invoke_method) do
+ @task_manager.invoke_and_wait do
# FIXME: This block can become Maybe Monad
get_hooks("pre_command").each {|hook|
break if text == nil # interrupt if hook returns nil
text = hook.call(text)
}
- next if text.empty?
+ return if text.empty?
commands = find_commands(text)
raise CommandNotFound, text if commands.empty?
@@ -222,7 +220,6 @@ def call_commands(text)
end
end
call_hooks("post_command", text)
- Readline.refresh_line if config.async
end
end

0 comments on commit 935745e

Please sign in to comment.