1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 10:02:57 +03:00

Do not make cursor visible when not dragging

Fixes #5130
This commit is contained in:
Maxime Coste 2024-03-27 19:07:09 +11:00
parent 610d4114a9
commit 390bff3435

View File

@ -161,7 +161,10 @@ struct MouseHandler
case Key::Modifiers::MouseRelease: {
if (not m_dragging)
{
context.ensure_cursor_visible = false;
return true;
}
auto& selections = context.selections();
cursor = context.window().buffer_coord(key.coord());
selections.main() = {buffer.clamp(m_anchor), cursor};
@ -172,7 +175,10 @@ struct MouseHandler
case Key::Modifiers::MousePos: {
if (not m_dragging)
{
context.ensure_cursor_visible = false;
return true;
}
cursor = context.window().buffer_coord(key.coord());
auto& selections = context.selections();
selections.main() = {buffer.clamp(m_anchor), cursor};