forked from extern/Unexpected-Keyboard
Fix crash when using a different script layout
This might happen when using a layout of a different script than the installed languages.
This commit is contained in:
parent
db3b021bfc
commit
b9526d918d
@ -71,6 +71,7 @@ public final class KeyboardData
|
|||||||
KeyPos next_to_pos = getKeys().get(pos.next_to);
|
KeyPos next_to_pos = getKeys().get(pos.next_to);
|
||||||
// Use preferred direction if some preferred pos match
|
// Use preferred direction if some preferred pos match
|
||||||
if (next_to_pos != null)
|
if (next_to_pos != null)
|
||||||
|
{
|
||||||
for (KeyPos p : pos.positions)
|
for (KeyPos p : pos.positions)
|
||||||
if ((p.row == -1 || p.row == next_to_pos.row)
|
if ((p.row == -1 || p.row == next_to_pos.row)
|
||||||
&& (p.col == -1 || p.col == next_to_pos.col)
|
&& (p.col == -1 || p.col == next_to_pos.col)
|
||||||
@ -79,6 +80,7 @@ public final class KeyboardData
|
|||||||
if (add_key_to_pos(rows, kv, next_to_pos.with_dir(-1)))
|
if (add_key_to_pos(rows, kv, next_to_pos.with_dir(-1)))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (KeyPos p : pos.positions)
|
for (KeyPos p : pos.positions)
|
||||||
if (add_key_to_pos(rows, kv, p))
|
if (add_key_to_pos(rows, kv, p))
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user