diff options
author | 2012-07-30 10:07:20 -0700 | |
---|---|---|
committer | 2012-07-30 10:07:20 -0700 | |
commit | 831a24bc1ff73dafffe4754b20d7005f1db7a995 (patch) | |
tree | dbe4c46846eec795fd4544cb0122fff2fb2ba7fb /java/src | |
parent | ed754b99915bfad79db615771dc73a60a089d3e2 (diff) | |
parent | f68fe7a9c9262a3591eeba61f34a91855a34c930 (diff) | |
download | latinime-831a24bc1ff73dafffe4754b20d7005f1db7a995.tar.gz latinime-831a24bc1ff73dafffe4754b20d7005f1db7a995.tar.xz latinime-831a24bc1ff73dafffe4754b20d7005f1db7a995.zip |
am f68fe7a9: Don\'t forward phantom space state on stripper input
* commit 'f68fe7a9c9262a3591eeba61f34a91855a34c930':
Don't forward phantom space state on stripper input
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 95d75ebb7..30edd2052 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1651,13 +1651,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (swapWeakSpace) { swapSwapperAndSpace(); mSpaceState = SPACE_STATE_SWAP_PUNCTUATION; - } else if (SPACE_STATE_PHANTOM == spaceState) { + } else if (SPACE_STATE_PHANTOM == spaceState + && !mCurrentSettings.isWeakSpaceStripper(primaryCode)) { // If we are in phantom space state, and the user presses a separator, we want to // stay in phantom space state so that the next keypress has a chance to add the // space. For example, if I type "Good dat", pick "day" from the suggestion strip // then insert a comma and go on to typing the next word, I want the space to be // inserted automatically before the next word, the same way it is when I don't // input the comma. + // The case is a little different if the separator is a space stripper. Such a + // separator does not normally need a space on the right (that's the difference + // between swappers and strippers), so we should not stay in phantom space state if + // the separator is a stripper. Hence the additional test above. mSpaceState = SPACE_STATE_PHANTOM; } |