Skip to content

Commit 780ead1

Browse files
committed
Disable auto space at start of text
1 parent 861b46c commit 780ead1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

java/src/org/futo/inputmethod/latin/inputlogic/InputLogic.java

+6
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,12 @@ private void handleSeparatorEvent(final Event event, final InputTransaction inpu
11351135
codeShouldBeFollowedBySpace = isInsideDoubleQuoteOrAfterDigit;
11361136
}
11371137

1138+
// Do not automatically insert a space if there is no text preceding the cursor
1139+
// (e.g. if we are typing "!g", do not insert space after exclamation mark,
1140+
// and if we are typing ":)", do not insert space after colon)
1141+
codeShouldBeFollowedBySpace = codeShouldBeFollowedBySpace
1142+
&& (mConnection.getCodePointBeforeCursor() != Constants.NOT_A_CODE);
1143+
11381144
if(autoInsertSpaces && codeShouldBeFollowedBySpace) {
11391145
insertOrSetPhantomSpace(settingsValues);
11401146

0 commit comments

Comments
 (0)