Class: Redwood::BufferListMode

Inherits:
LineCursorMode show all
Defined in:
lib/sup/modes/buffer-list-mode.rb

Constant Summary

Constant Summary

Constants inherited from ScrollMode

ScrollMode::COL_JUMP

Instance Attribute Summary

Attributes inherited from LineCursorMode

#curpos

Attributes inherited from ScrollMode

#botline, #leftcol, #status, #topline

Attributes inherited from Mode

#buffer

Instance Method Summary collapse

Methods inherited from LineCursorMode

#draw

Methods inherited from ScrollMode

#at_bottom?, #at_top?, #cancel_search!, #col_left, #col_right, #continue_search_in_buffer, #draw, #ensure_mode_validity, #half_page_down, #half_page_up, #in_search?, #jump_to_col, #jump_to_end, #jump_to_left, #jump_to_line, #jump_to_start, #line_down, #line_up, #page_down, #page_up, #resize, #rightcol, #search_goto_line, #search_goto_pos, #search_in_buffer, #search_start_line

Methods inherited from Mode

#blur, #cancel_search!, #cleanup, #draw, #handle_input, #help_text, #in_search?, #killable?, load_all_modes, make_name, #name, #pipe_to_process, register_keymap, #resize, #resolve_input, #save_to_file, #status

Constructor Details

#initializeBufferListMode

Returns a new instance of BufferListMode



9
10
11
12
# File 'lib/sup/modes/buffer-list-mode.rb', line 9

def initialize
  regen_text
  super
end

Instance Method Details

#[](i) ⇒ Object



15
# File 'lib/sup/modes/buffer-list-mode.rb', line 15

def [] i; @text[i] end

#focusObject



17
18
19
# File 'lib/sup/modes/buffer-list-mode.rb', line 17

def focus
  reload # buffers may have been killed or created since last view
end

#linesObject



14
# File 'lib/sup/modes/buffer-list-mode.rb', line 14

def lines; @text.length end