Sha256: 94e52ff864049428302ed8bc2fe6da09d64380e632f129098bdf3c850954280a
Contents?: true
Size: 551 Bytes
Versions: 10
Compression:
Stored size: 551 Bytes
Contents
module Textbringer class BufferListMode < Mode define_keymap :BUFFER_LIST_MODE_MAP 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
10 entries across 10 versions & 1 rubygems