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
f71e1db2
Commit
f71e1db2
authored
11 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Don't resume suggestion on digits.
Bug: 10780016 Change-Id: I94fad06e4c71eddc96bdda1765925f98bed160f3
parent
060917ed
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/LatinIME.java
+8
-0
8 additions, 0 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
with
8 additions
and
0 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
8
−
0
View file @
f71e1db2
...
@@ -2685,6 +2685,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -2685,6 +2685,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
return
prevWord
;
return
prevWord
;
}
}
private
boolean
isResumableWord
(
final
String
word
,
final
SettingsValues
settings
)
{
final
int
firstCodePoint
=
word
.
codePointAt
(
0
);
return
settings
.
isWordCodePoint
(
firstCodePoint
)
&&
Constants
.
CODE_SINGLE_QUOTE
!=
firstCodePoint
&&
Constants
.
CODE_DASH
!=
firstCodePoint
;
}
/**
/**
* Check if the cursor is touching a word. If so, restart suggestions on this word, else
* Check if the cursor is touching a word. If so, restart suggestions on this word, else
* do nothing.
* do nothing.
...
@@ -2714,6 +2721,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -2714,6 +2721,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if
(
numberOfCharsInWordBeforeCursor
>
mLastSelectionStart
)
return
;
if
(
numberOfCharsInWordBeforeCursor
>
mLastSelectionStart
)
return
;
final
ArrayList
<
SuggestedWordInfo
>
suggestions
=
CollectionUtils
.
newArrayList
();
final
ArrayList
<
SuggestedWordInfo
>
suggestions
=
CollectionUtils
.
newArrayList
();
final
String
typedWord
=
range
.
mWord
.
toString
();
final
String
typedWord
=
range
.
mWord
.
toString
();
if
(!
isResumableWord
(
typedWord
,
currentSettings
))
return
;
int
i
=
0
;
int
i
=
0
;
for
(
final
SuggestionSpan
span
:
range
.
getSuggestionSpansAtWord
())
{
for
(
final
SuggestionSpan
span
:
range
.
getSuggestionSpansAtWord
())
{
for
(
final
String
s
:
span
.
getSuggestions
())
{
for
(
final
String
s
:
span
.
getSuggestions
())
{
...
...
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