diff options
| author | Jules Aguillon | 2026-05-02 19:32:21 +0200 |
|---|---|---|
| committer | GitHub | 2026-05-02 19:32:21 +0200 |
| commit | 9c23e6c5f3459240a87898762cbfa90cef766ad7 (patch) | |
| tree | 7b632f324e5d14431105ae87ea4e65dbda463d4f /srcs/juloo.keyboard2/KeyEventHandler.java | |
| parent | d164820bca8d2182869108f8a015ce3d987d048d (diff) | |
| download | unexpected-keyboard-9c23e6c5f3459240a87898762cbfa90cef766ad7.tar.gz unexpected-keyboard-9c23e6c5f3459240a87898762cbfa90cef766ad7.zip | |
Emoji suggestion (#1235)
Suggest an emoji in addition to the 3 suggested words when the
current word matches an alias in the emoji dictionary, if
available.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyEventHandler.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyEventHandler.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 66a10df..78a4095 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -532,10 +532,10 @@ public final class KeyEventHandler /** Implement autocorrect when enabled in the settings. */ void handle_space_bar() { - if (_space_bar_auto_complete && _suggestions.best_suggestion != null + if (_space_bar_auto_complete && _suggestions.count > 0 && !_typedword.is_selection_not_empty() && _typedword.cursor_relative() == 0) - suggestion_entered(_suggestions.best_suggestion); + suggestion_entered(_suggestions.suggestions[0]); else send_text(" "); } |
