lib/textbringer/commands/server.rb in textbringer-0.3.1 vs lib/textbringer/commands/server.rb in textbringer-0.3.2
- old
+ new
@@ -32,26 +32,26 @@
end
end
class Server
def eval(s)
- redisplay do
+ with_redisplay do
Controller.current.instance_eval(s).inspect
end
end
def visit_file(filename, wait: true)
queue = Queue.new if wait
- redisplay do
+ with_redisplay do
find_file(filename)
Buffer.current[:client_wait_queue] = queue if wait
end
queue.deq if wait
end
private
- def redisplay
+ def with_redisplay
foreground! do
begin
yield
ensure
Window.redisplay