diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-05-22 16:56:06 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-05-22 16:57:22 +0100 |
| commit | 28bcb45b925427da1fb3204eac332fc43d74365e (patch) | |
| tree | 6946ffbc0e553864505b0928049fff5da1955cda /src/context.cc | |
| parent | bc11e52960e025c4ae6bcde796facca1ff1a7cdc (diff) | |
Fix bug where idle timers of disabled modes were still run
Diffstat (limited to 'src/context.cc')
| -rw-r--r-- | src/context.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/context.cc b/src/context.cc index 09d1d4d5..3963254d 100644 --- a/src/context.cc +++ b/src/context.cc @@ -148,10 +148,6 @@ void Context::change_buffer(Buffer& buffer) if (m_edition_level > 0) this->buffer().commit_undo_group(); - - if (has_input_handler()) - input_handler().reset_normal_mode(); - m_window.reset(); if (has_client()) { @@ -161,6 +157,9 @@ void Context::change_buffer(Buffer& buffer) } else m_selections = SelectionList{buffer, Selection{}}; + + if (has_input_handler()) + input_handler().reset_normal_mode(); } SelectionList& Context::selections() |
