diff options
| -rw-r--r-- | srcs/juloo.keyboard2/CurrentlyTypedWord.java | 4 | ||||
| -rw-r--r-- | srcs/juloo.keyboard2/KeyEventHandler.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/srcs/juloo.keyboard2/CurrentlyTypedWord.java b/srcs/juloo.keyboard2/CurrentlyTypedWord.java index 5a0733b..87a1cf1 100644 --- a/srcs/juloo.keyboard2/CurrentlyTypedWord.java +++ b/srcs/juloo.keyboard2/CurrentlyTypedWord.java @@ -68,8 +68,8 @@ public final class CurrentlyTypedWord if (!_enabled || (newSelStart == _cursor && new_has_sel == _has_selection)) return; _has_selection = new_has_sel; - refresh_current_word(); _cursor = newSelStart; + refresh_current_word(); } public void event_sent(int code, int meta) @@ -119,7 +119,9 @@ public final class CurrentlyTypedWord return; } _w.setLength(0); + int saved_cursor = _cursor; type_chars(text_before_cursor.toString()); + _cursor = saved_cursor; callback(); } diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 057033b..17c7d7b 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -234,9 +234,9 @@ public final class KeyEventHandler InputConnection conn = _recv.getCurrentInputConnection(); if (conn == null) return; - conn.commitText(text, 1); _autocap.typed(text); _typedword.typed(text); + conn.commitText(text, 1); } void replace_text_before_cursor(int remove_length, String new_text) @@ -248,8 +248,6 @@ public final class KeyEventHandler conn.deleteSurroundingText(remove_length, 0); conn.commitText(new_text, 1); conn.endBatchEdit(); - _autocap.typed(new_text); - _typedword.typed(new_text); } /** See {!InputConnection.performContextMenuAction}. */ |
