class Fir::CtrlACommand
Public Class Methods
character_regex()
click to toggle source
# File lib/fir/key_command/ctrl_a_command.rb, line 8 def self.character_regex /^\x01$/ end
Public Instance Methods
execute_hook(new_state)
click to toggle source
# File lib/fir/key_command/ctrl_a_command.rb, line 12 def execute_hook(new_state) unless state.blank? if state.cursor.x.positive? new_state.cursor = state.cursor.left(state.cursor.x) end end new_state end