Method: Ruber::EditorView#move_cursor_by
- Defined in:
- lib/ruber/editor/editor_view.rb
#move_cursor_by(row, col) ⇒ Boolean
Moves the cursor of the given amount
If the cursor ends up being out of range, nothing is done
124 125 126 127 128 129 |
# File 'lib/ruber/editor/editor_view.rb', line 124 def move_cursor_by row, col cur = @view.cursor_position cur.line += row cur.column += col @view.set_cursor_position cur end |