Fix selection mode not exited when selection cleared

The selection mode was not exited when the selection was cleared with,
for example, ctrl+x.
This commit is contained in:
Jules Aguillon 2025-06-19 01:03:21 +02:00
parent 71d2784026
commit 36d3b9d9d0

View File

@ -108,7 +108,10 @@ public final class Pointers implements Handler.Callback
{ {
// No existing pointer, latch the key. // No existing pointer, latch the key.
if (latched) if (latched)
{
add_fake_pointer(key, kv, lock); add_fake_pointer(key, kv, lock);
_handler.onPointerFlagsChanged(false);
}
} }
else if ((ptr.flags & FLAG_P_FAKE) == 0) else if ((ptr.flags & FLAG_P_FAKE) == 0)
{} // Key already latched but not by a fake ptr, do nothing. {} // Key already latched but not by a fake ptr, do nothing.
@ -118,6 +121,7 @@ public final class Pointers implements Handler.Callback
removePtr(ptr); removePtr(ptr);
if (latched) if (latched)
add_fake_pointer(key, kv, lock); add_fake_pointer(key, kv, lock);
_handler.onPointerFlagsChanged(false);
} }
else if ((ptr.flags & FLAG_P_LOCKED) != 0) else if ((ptr.flags & FLAG_P_LOCKED) != 0)
{} // Existing ptr is locked but [lock] is false, do not continue. {} // Existing ptr is locked but [lock] is false, do not continue.