mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-18 19:39:00 +02:00
Compare commits
1 Commits
crash-numb
...
sel-mode-f
Author | SHA1 | Date | |
---|---|---|---|
|
5d62cf7901 |
@@ -320,10 +320,16 @@ public final class KeyEventHandler
|
||||
{
|
||||
int sel_start = et.selectionStart;
|
||||
int sel_end = et.selectionEnd;
|
||||
if (sel_left == (sel_start <= sel_end))
|
||||
sel_start += d;
|
||||
else
|
||||
sel_end += d;
|
||||
boolean modify_sel_start = sel_left == (sel_start <= sel_end);
|
||||
do
|
||||
{
|
||||
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))
|
||||
return; // Fallback to sending key events if [setSelection] failed
|
||||
}
|
||||
|
Reference in New Issue
Block a user