summaryrefslogtreecommitdiff
path: root/src/context.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/context.cc')
-rw-r--r--src/context.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/context.cc b/src/context.cc
index 2a0822ec..07259c97 100644
--- a/src/context.cc
+++ b/src/context.cc
@@ -178,7 +178,6 @@ void Context::change_buffer(Buffer& buffer)
m_last_buffer = contains(BufferManager::instance(), current) ? current : nullptr;
}
- m_window.reset();
if (has_client())
{
client().info_hide();
@@ -186,7 +185,10 @@ void Context::change_buffer(Buffer& buffer)
client().change_buffer(buffer);
}
else
+ {
+ m_window.reset();
m_selections = SelectionList{buffer, Selection{}};
+ }
if (has_input_handler())
input_handler().reset_normal_mode();