Skip to content

Commit

Permalink
fix url detction ignoring no-suggestions request, fixes Helium314#180
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Sep 25, 2023
1 parent d8c80b7 commit a330e9d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,9 @@ private void handleNonSeparatorEvent(final Event event, final SettingsValues set
boolean isComposingWord = mWordComposer.isComposingWord();

// if we continue directly after a sometimesWordConnector, restart suggestions for the whole word
// (only with URL detection enabled)
if (settingsValues.mUrlDetectionEnabled && !isComposingWord && SpaceState.NONE == inputTransaction.getMSpaceState()
// (only with URL detection and suggestions enabled)
if (settingsValues.mUrlDetectionEnabled && settingsValues.needsToLookupSuggestions()
&& !isComposingWord && SpaceState.NONE == inputTransaction.getMSpaceState()
&& settingsValues.mSpacingAndPunctuations.isSometimesWordConnector(mConnection.getCodePointBeforeCursor())
// but not if there are two consecutive sometimesWordConnectors (e.g. "...bla")
&& !settingsValues.mSpacingAndPunctuations.isSometimesWordConnector(mConnection.getCharBeforeBeforeCursor())
Expand Down

0 comments on commit a330e9d

Please sign in to comment.