lib/ruco/editor_area.rb in ruco-0.0.43 vs lib/ruco/editor_area.rb in ruco-0.0.44
- old
+ new
@@ -2,10 +2,10 @@
# everything that does not belong to a text-area
# but is needed for Ruco::Editor
class EditorArea < TextArea
def initialize(*args)
super(*args)
- @history = History.new(:state => state, :track => [:content], :entries => 100, :timeout => 2)
+ @history = History.new((args.last[:history]||{}).reverse_merge(:state => state, :track => [:content], :entries => 100, :timeout => 2))
end
def undo
@history.undo
self.state = @history.state
\ No newline at end of file