lib/textbringer/commands/buffers.rb in textbringer-0.1.6 vs lib/textbringer/commands/buffers.rb in textbringer-0.1.7

- old
+ new

@@ -53,23 +53,19 @@ end define_command(:self_insert) do |n = number_prefix_arg| c = Controller.current.last_key merge_undo = Controller.current.last_command == :self_insert - n.times do - Buffer.current.insert(c, merge_undo) - end + Buffer.current.insert(c * n, merge_undo) end define_command(:quoted_insert) do |n = number_prefix_arg| c = Controller.current.read_char if !c.is_a?(String) raise EditorError, "Invalid key" end - n.times do - Buffer.current.insert(c) - end + Buffer.current.insert(c * n) end define_command(:kill_line) do Buffer.current.kill_line(Controller.current.last_command == :kill_region) Controller.current.this_command = :kill_region @@ -88,14 +84,14 @@ Controller.current.this_command = :yank end define_command(:undo) do Buffer.current.undo - message("Undo!") + message("Undo!") unless Window.echo_area.current? end define_command(:redo) do Buffer.current.redo - message("Redo!") + message("Redo!") unless Window.echo_area.current? end end end