1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-04 16:53:27 +03:00

Merge remote-tracking branch 'krobelus/fix-mouse-click-during-insert'

This commit is contained in:
Maxime Coste 2023-01-18 07:48:37 +11:00
commit d8883d47c0
6 changed files with 14 additions and 3 deletions

View File

@ -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; }

View File

@ -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))

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
123

View File

@ -0,0 +1 @@
a1b2c3

View File

@ -0,0 +1,11 @@
ui_out -ignore 4
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "i" ] }'
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "a" ] }'
sleep .1
ui_in '{ "jsonrpc": "2.0", "method": "mouse_press", "params": [ "left", 0, 2 ] }'
sleep .1
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "b" ] }'
sleep .1
ui_in '{ "jsonrpc": "2.0", "method": "mouse_release", "params": [ "left", 0, 4 ] }'
sleep .1
ui_in '{ "jsonrpc": "2.0", "method": "keys", "params": [ "c<esc>" ] }'