Remove trailing spaces when appropriate

Bug: 5509651
Change-Id: I99cfb5a6fc2873e2c11ed16967cd82a7f504a263
main
Jean Chalard 2011-10-26 20:59:17 +09:00
parent d4eaa1bc32
commit 2c77216e22
1 changed files with 5 additions and 1 deletions

View File

@ -1582,7 +1582,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
final boolean swapMagicSpace;
if (SPACE_STATE_MAGIC == spaceState) {
if (Keyboard.CODE_ENTER == primaryCode && (SPACE_STATE_MAGIC == spaceState
|| SPACE_STATE_SWAP_PUNCTUATION == spaceState)) {
removeTrailingSpaceWhileInBatchEdit(ic);
swapMagicSpace = false;
} else if (SPACE_STATE_MAGIC == spaceState) {
if (mSettingsValues.isMagicSpaceSwapper(primaryCode)) {
swapMagicSpace = true;
} else {