lib/textbringer/controller.rb in textbringer-0.2.2 vs lib/textbringer/controller.rb in textbringer-0.2.3
- old
+ new
@@ -113,10 +113,13 @@
end
@next_tick_output.write("\n")
end
def read_event
+ if executing_keyboard_macro?
+ return @executing_keyboard_macro.shift
+ end
event = read_event_nonblock
if event
return event
end
loop do
@@ -251,10 +254,10 @@
private
def read_event_with_keyboard_macro(read_event_method)
if !executing_keyboard_macro?
c = call_read_event_method(read_event_method)
- if @recording_keyboard_macro
+ if c && @recording_keyboard_macro
@recording_keyboard_macro.push(c)
end
c
else
@executing_keyboard_macro.shift