From 66e422e3971acd8b36b23e52ac3def70534294fb Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 22 Jan 2017 12:19:23 +0000 Subject: [PATCH] Fix client destruction when there is an InsertMode mode still alive --- src/client.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client.cc b/src/client.cc index 07812222..4d0547ec 100644 --- a/src/client.cc +++ b/src/client.cc @@ -55,8 +55,10 @@ Client::~Client() { m_window->options().unregister_watcher(*this); m_window->set_client(nullptr); + // Do not move the selections here, as we need them to be valid + // in order to correctly destroy the input handler ClientManager::instance().add_free_window(std::move(m_window), - std::move(context().selections())); + context().selections()); } bool Client::process_pending_inputs()