From 43b5bd526081410458a8ffa876c4d9c3c88be761 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 9 Apr 2013 14:22:21 +0200 Subject: [PATCH] add ga binding to go to last buffer --- src/main.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.cc b/src/main.cc index 40270ed8..4edfa102 100644 --- a/src/main.cc +++ b/src/main.cc @@ -87,6 +87,17 @@ void do_go(Context& context) editor.select(buf.iterator_at_line_begin(buf.line_count() - 1), mode); break; } + case 'a': + { + auto& buffer_manager = BufferManager::instance(); + auto it = buffer_manager.begin(); + if (it->get() == &context.buffer() and ++it == buffer_manager.end()) + break; + context.push_jump(); + auto& client_manager = ClientManager::instance(); + context.change_editor(client_manager.get_unused_window_for_buffer(**it)); + break; + } case 'f': { String filename = context.editor().main_selection().content();