Class: Textbringer::BacktraceMode

Inherits:
Mode
  • Object
show all
Defined in:
lib/textbringer/modes/backtrace_mode.rb

Constant Summary collapse

BACKTRACE_MODE_MAP =
Keymap.new

Constants included from Commands

Commands::ISEARCH_MODE_MAP, Commands::ISEARCH_STATUS, Commands::RE_SEARCH_STATUS, Commands::UNIVERSAL_ARGUMENT_MAP

Constants included from Utils

Utils::HOOKS, Utils::Y_OR_N_MAP

Instance Attribute Summary

Attributes inherited from Mode

#buffer

Instance Method Summary collapse

Methods inherited from Mode

define_generic_command, inherited, list, #name

Methods included from Commands

#current_prefix_arg, define_command, #isearch_done, #isearch_mode, #isearch_pre_command_hook, #isearch_prompt, #isearch_repeat, #isearch_repeat_backward, #isearch_repeat_forward, #isearch_search, list, #match_beginning, #match_end, #match_string, #number_prefix_arg, #replace_match, undefine_command, #universal_argument_mode

Methods included from Utils

#add_hook, #complete, #handle_exception, #message, #read_buffer, #read_char, #read_command_name, #read_file_name, #read_from_minibuffer, #read_single_char, #received_keyboard_quit?, #remove_hook, #run_hooks, #self_insert_and_exit_minibuffer, #set_transient_map, #sit_for, #sleep_for, #y_or_n?, #yes_or_no?

Constructor Details

#initialize(buffer) ⇒ BacktraceMode

Returns a new instance of BacktraceMode.



10
11
12
13
# File 'lib/textbringer/modes/backtrace_mode.rb', line 10

def initialize(buffer)
  super(buffer)
  buffer.keymap = BACKTRACE_MODE_MAP
end

Instance Method Details

#jump_to_source_locationObject



15
16
17
18
19
20
21
# File 'lib/textbringer/modes/backtrace_mode.rb', line 15

def jump_to_source_location
  file_name, line_number = get_source_location
  if file_name
    find_file(file_name)
    goto_line(line_number)
  end
end