diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-04-10 18:54:01 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-04-10 18:54:01 +0200 |
| commit | 9999e5698d50b384eb95181ef06db4cc99c90bb2 (patch) | |
| tree | 2e1fb8eafc82fa4c662afd75c044589283c39ad2 /src/client_manager.cc | |
| parent | 441f9a69efc18630b4c508688ef403b0ed81b19d (diff) | |
Use the buffer manager to delete buffer, throw when a client is inserting
Diffstat (limited to 'src/client_manager.cc')
| -rw-r--r-- | src/client_manager.cc | 4 |
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. |
