mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-23 07:39:11 +00:00
fix issue when trying to paste text while cursor is in a word
This commit is contained in:
parent
6c2a3e8b5f
commit
af3d0535b2
1 changed files with 8 additions and 2 deletions
|
@ -228,8 +228,14 @@ public final class InputLogic {
|
|||
getActualCapsMode(settingsValues, keyboardShiftMode));
|
||||
mConnection.beginBatchEdit();
|
||||
if (mWordComposer.isComposingWord()) {
|
||||
commitCurrentAutoCorrection(settingsValues, rawText, handler);
|
||||
addToHistoryIfEmoji(rawText, settingsValues); // add emoji after committing text
|
||||
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
|
||||
// stop composing, otherwise the text will end up at the end of the current word
|
||||
mConnection.finishComposingText();
|
||||
resetComposingState(false);
|
||||
} else {
|
||||
commitCurrentAutoCorrection(settingsValues, rawText, handler);
|
||||
addToHistoryIfEmoji(rawText, settingsValues); // add emoji after committing text
|
||||
}
|
||||
} else {
|
||||
addToHistoryIfEmoji(rawText, settingsValues); // add emoji before resetting, otherwise lastComposedWord is empty
|
||||
resetComposingState(true /* alsoResetLastComposedWord */);
|
||||
|
|
Loading…
Add table
Reference in a new issue