Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions srcs/juloo.keyboard2/KeyEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public void started(Config conf)
InputConnection ic = _recv.getCurrentInputConnection();
_autocap.started(conf, ic);
_typedword.started(conf, ic);
_suggestions.started();
_move_cursor_force_fallback =
conf.editor_config.should_move_cursor_force_fallback;
_space_bar_auto_complete = conf.space_bar_auto_complete;
Expand Down
9 changes: 9 additions & 0 deletions srcs/juloo.keyboard2/suggestions/Suggestions.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public final class Suggestions
{
Callback _callback;
Config _config;
boolean _enabled;

/** The suggestion displayed at the center of the candidates view and entered
by the space bar. */
Expand All @@ -23,8 +24,16 @@ public Suggestions(Callback c, Config conf)
_config = conf;
}

public void started()
{
_enabled = _config.editor_config.should_show_candidates_view;
best_suggestion = null;
}

public void currently_typed_word(String word)
{
if (!_enabled)
return;
Cdict dict = _config.current_dictionary;
if (word.length() < 2 || dict == null)
{
Expand Down
Loading