From 35f23d6fad77e3799fda33e70435f3f3593e79f1 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 3 Dec 2022 19:00:46 +0100 Subject: Remove bogus assertions preventing mouse clicks in insert mode Recent changes for selection-undo added an assertion that triggers when a mouse-drag overlaps with an insert mode, because both events record selection history. However this is actually fine. The one that finishes last concludes the selection edition, while the other one will be a nop. The test could be simpler (i.e. not require sleeps) but I figured it doesn't hurt add this since we don't have any comparable tests. --- src/input_handler.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index f90d2d22..664490d6 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -100,7 +100,6 @@ struct MouseHandler switch (key.mouse_button()) { case Key::MouseButton::Right: { - kak_assert(not context.is_editing_selection()); m_dragging.reset(); cursor = context.window().buffer_coord(key.coord()); ScopedSelectionEdition selection_edition{context}; @@ -114,7 +113,6 @@ struct MouseHandler } case Key::MouseButton::Left: { - kak_assert(not context.is_editing_selection()); m_dragging.reset(new ScopedSelectionEdition{context}); m_anchor = context.window().buffer_coord(key.coord()); if (not (key.modifiers & Key::Modifiers::Control)) -- cgit v1.2.3