summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/context.hh1
-rw-r--r--src/input_handler.cc2
2 files changed, 0 insertions, 3 deletions
diff --git a/src/context.hh b/src/context.hh
index 5ef3c42c..3fe28dc2 100644
--- a/src/context.hh
+++ b/src/context.hh
@@ -117,7 +117,6 @@ public:
bool is_editing() const { return m_edition_level!= 0; }
void disable_undo_handling() { m_edition_level = -1; }
- bool is_editing_selection() const { return m_selection_history.in_edition(); }
NestedBool& hooks_disabled() { return m_hooks_disabled; }
const NestedBool& hooks_disabled() const { return m_hooks_disabled; }
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))