Merge remote-tracking branch 'krobelus/fix-mouse-click-during-insert'
This commit is contained in:
commit
d8883d47c0
|
@ -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; }
|
||||
|
|
|
@ -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))
|
||||
|
|
1
test/regression/0-mouse-during-insert/cmd
Normal file
1
test/regression/0-mouse-during-insert/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
test/regression/0-mouse-during-insert/in
Normal file
1
test/regression/0-mouse-during-insert/in
Normal file
|
@ -0,0 +1 @@
|
|||
123
|
1
test/regression/0-mouse-during-insert/out
Normal file
1
test/regression/0-mouse-during-insert/out
Normal file
|
@ -0,0 +1 @@
|
|||
a1b2c3
|
11
test/regression/0-mouse-during-insert/script
Normal file
11
test/regression/0-mouse-during-insert/script
Normal 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>" ] }'
|
Loading…
Reference in New Issue
Block a user