Sha256: f7382d87898fa9bde931119056935cd88a05c7e2ec6fa54914010b06861275d8
Contents?: true
Size: 549 Bytes
Versions: 1
Compression:
Stored size: 549 Bytes
Contents
module Textbringer class BufferListMode < Mode BUFFER_LIST_MODE_MAP = Keymap.new BUFFER_LIST_MODE_MAP.define_key("\C-m", :this_window_command) def initialize(buffer) super(buffer) buffer.keymap = BUFFER_LIST_MODE_MAP end define_local_command(:this_window, doc: "Change the current account.") do name = @buffer.save_excursion { @buffer.beginning_of_line @buffer.looking_at?(/.*/) @buffer.match_string(0) } switch_to_buffer(name) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
textbringer-1.0.1 | lib/textbringer/modes/buffer_list_mode.rb |