class TextEditor::Command::InsertChar

Public Instance Methods

run(key) click to toggle source
  # File lib/text_editor/command/insert_char.rb
4 def run(key)
5   new_buffer = buffer.insert_char(line, column, key)
6   new_cursor = cursor.right(key.size)
7   window.update(new_buffer, new_cursor)
8 end