Sha256: 21c5e433e712850a5ee48931807fa20dcb4cfd5e0466551d618a3c9c9d664ad7
Contents?: true
Size: 580 Bytes
Versions: 5
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true 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
5 entries across 5 versions & 1 rubygems