summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2022-12-03 19:00:46 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2023-01-08 10:47:36 +0100
commit35f23d6fad77e3799fda33e70435f3f3593e79f1 (patch)
tree33e8bd1d27859132dd747fcf1a6ae54a752179e1 /src/input_handler.cc
parent938be7a7b0fb0753329bc74735e4d9d2132ea28c (diff)
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.
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc2
1 files changed, 0 insertions, 2 deletions
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))