summaryrefslogtreecommitdiff
path: root/src/client_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/client_manager.cc')
-rw-r--r--src/client_manager.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client_manager.cc b/src/client_manager.cc
index 6db8afd4..d651a057 100644
--- a/src/client_manager.cc
+++ b/src/client_manager.cc
@@ -138,6 +138,10 @@ void ClientManager::ensure_no_client_uses_buffer(Buffer& buffer)
if (&client->context().buffer() != &buffer)
continue;
+ if (client->context().editor().is_editing())
+ throw runtime_error("client '" + client->name + "' is inserting in '" +
+ buffer.display_name() + '\'');
+
// change client context to edit the first buffer which is not the
// specified one. As BufferManager stores buffer according to last
// access, this selects a sensible buffer to display.