Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
966efe48
Commit
966efe48
authored
12 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug with suggestion behavior (A81)
Bug: 6788235 Change-Id: I5a4212872e0fd3f9e80168fd3abd5c2b3bc4110f
parent
a5bb353d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/Suggest.java
+7
-2
7 additions, 2 deletions
java/src/com/android/inputmethod/latin/Suggest.java
with
7 additions
and
2 deletions
java/src/com/android/inputmethod/latin/Suggest.java
+
7
−
2
View file @
966efe48
...
...
@@ -174,7 +174,7 @@ public class Suggest {
:
typedWord
;
LatinImeLogger
.
onAddSuggestedWord
(
typedWord
,
Dictionary
.
TYPE_USER_TYPED
);
if
(
wordComposer
.
size
()
<=
1
&&
isCorrectionEnabled
)
{
if
(
wordComposer
.
size
()
<=
1
)
{
// At first character typed, search only the bigrams
if
(!
TextUtils
.
isEmpty
(
prevWordForBigram
))
{
for
(
final
String
key
:
mDictionaries
.
keySet
())
{
...
...
@@ -182,7 +182,7 @@ public class Suggest {
suggestionsSet
.
addAll
(
dictionary
.
getBigrams
(
wordComposer
,
prevWordForBigram
));
}
}
}
else
if
(
wordComposer
.
size
()
>
1
)
{
}
else
{
final
WordComposer
wordComposerForLookup
;
if
(
trailingSingleQuotesCount
>
0
)
{
wordComposerForLookup
=
new
WordComposer
(
wordComposer
);
...
...
@@ -216,6 +216,11 @@ public class Suggest {
mWhiteListDictionary
.
getWhitelistedWord
(
consideredWord
);
final
boolean
hasAutoCorrection
;
// TODO: using isCorrectionEnabled here is not very good. It's probably useless, because
// any attempt to do auto-correction is already shielded with a test for this flag; at the
// same time, it feels wrong that the SuggestedWord object includes information about
// the current settings. It may also be useful to know, when the setting is off, whether
// the word *would* have been auto-corrected.
if
(!
isCorrectionEnabled
||
!
allowsToBeAutoCorrected
||
wordComposer
.
isMostlyCaps
()
||
wordComposer
.
isResumed
()
||
!
hasMainDictionary
())
{
// If we don't have a main dictionary, we never want to auto-correct. The reason for
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment