mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-18 20:38:42 +02:00
Compare commits
1 Commits
insets-nav
...
sel-mode-f
Author | SHA1 | Date | |
---|---|---|---|
|
5d62cf7901 |
@@ -320,10 +320,16 @@ public final class KeyEventHandler
|
|||||||
{
|
{
|
||||||
int sel_start = et.selectionStart;
|
int sel_start = et.selectionStart;
|
||||||
int sel_end = et.selectionEnd;
|
int sel_end = et.selectionEnd;
|
||||||
if (sel_left == (sel_start <= sel_end))
|
boolean modify_sel_start = sel_left == (sel_start <= sel_end);
|
||||||
sel_start += d;
|
do
|
||||||
else
|
{
|
||||||
sel_end += d;
|
if (modify_sel_start)
|
||||||
|
sel_start += d;
|
||||||
|
else
|
||||||
|
sel_end += d;
|
||||||
|
// Move the cursor twice if moving it once would make the selection
|
||||||
|
// empty and stop selection mode.
|
||||||
|
} while (sel_start == sel_end);
|
||||||
if (conn.setSelection(sel_start, sel_end))
|
if (conn.setSelection(sel_start, sel_end))
|
||||||
return; // Fallback to sending key events if [setSelection] failed
|
return; // Fallback to sending key events if [setSelection] failed
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user