class TextEditor::Command::CursorRight
Public Instance Methods
run(*)
click to toggle source
# File lib/text_editor/command/cursor_right.rb 4 def run(*) 5 lines = buffer.size.pred 6 columns = buffer.line(line).size 7 new_cursor = cursor.right.clamp(lines, columns) 8 window.update(buffer, new_cursor) 9 end