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
d23d1970
Commit
d23d1970
authored
10 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Implement backspace in the current cluster for Myanmar
Bug: 13945569 Change-Id: I738b01ede25fd731a2e10c4775f5511ce9bb54c8
parent
61ddac28
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/event/MyanmarReordering.java
+27
-3
27 additions, 3 deletions
.../src/com/android/inputmethod/event/MyanmarReordering.java
with
27 additions
and
3 deletions
java/src/com/android/inputmethod/event/MyanmarReordering.java
+
27
−
3
View file @
d23d1970
...
@@ -207,9 +207,33 @@ public class MyanmarReordering implements Combiner {
...
@@ -207,9 +207,33 @@ public class MyanmarReordering implements Combiner {
return
clearAndGetResultingEvent
(
newEvent
);
return
clearAndGetResultingEvent
(
newEvent
);
}
}
}
else
if
(
Constants
.
CODE_DELETE
==
newEvent
.
mKeyCode
)
{
}
else
if
(
Constants
.
CODE_DELETE
==
newEvent
.
mKeyCode
)
{
if
(
mCurrentEvents
.
size
()
>
0
)
{
final
Event
lastEvent
=
getLastEvent
();
mCurrentEvents
.
remove
(
mCurrentEvents
.
size
()
-
1
);
final
int
eventSize
=
mCurrentEvents
.
size
();
return
null
;
if
(
null
!=
lastEvent
)
{
if
(
VOWEL_E
==
lastEvent
.
mCodePoint
)
{
// We have a VOWEL_E at the end. There are four cases.
// - The vowel is the only code point in the buffer. Remove it.
// - The vowel is preceded by a ZWNJ. Remove both vowel E and ZWNJ.
// - The vowel is preceded by a consonant/medial, remove the consonant/medial.
// - In all other cases, it's strange, so just remove the last code point.
if
(
eventSize
<=
1
)
{
mCurrentEvents
.
clear
();
}
else
{
// eventSize >= 2
final
int
previousCodePoint
=
mCurrentEvents
.
get
(
eventSize
-
2
).
mCodePoint
;
if
(
previousCodePoint
==
ZERO_WIDTH_NON_JOINER
)
{
mCurrentEvents
.
remove
(
eventSize
-
1
);
mCurrentEvents
.
remove
(
eventSize
-
2
);
}
else
if
(
isConsonantOrMedial
(
previousCodePoint
))
{
mCurrentEvents
.
remove
(
eventSize
-
2
);
}
else
{
mCurrentEvents
.
remove
(
eventSize
-
1
);
}
}
return
null
;
}
else
if
(
eventSize
>
0
)
{
mCurrentEvents
.
remove
(
eventSize
-
1
);
return
null
;
}
}
}
}
}
// This character is not part of the combining scheme, so we should reset everything.
// This character is not part of the combining scheme, so we should reset everything.
...
...
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