From 8e5f491d3fe9721022ea2b5e6f9edf2048849a51 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 5 Nov 2016 11:29:47 +0000 Subject: [PATCH] Support deleting a buffer even if another client is in insert mode on it --- src/client_manager.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client_manager.cc b/src/client_manager.cc index 666df922..72a3eb28 100644 --- a/src/client_manager.cc +++ b/src/client_manager.cc @@ -118,9 +118,7 @@ void ClientManager::ensure_no_client_uses_buffer(Buffer& buffer) continue; if (context.is_editing()) - throw runtime_error(format("client '{}' is inserting in buffer '{}'", - context.name(), - buffer.display_name())); + context.input_handler().reset_normal_mode(); Buffer* last = client->last_buffer(); context.change_buffer(last ? *last : BufferManager::instance().get_first_buffer());