Skip to content

Commit 50d333a

Browse files
committed
fix half-way commit text
1 parent bafe97f commit 50d333a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rime/gear/ascii_composer.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ void AsciiComposer::SwitchAsciiMode(bool ascii_mode,
224224
[this](Context* ctx) { OnContextUpdate(ctx); });
225225
}
226226
} else if (style == kAsciiModeSwitchCommitText) {
227-
ctx->ConfirmCurrentSelection();
227+
while (ctx->composition().back().end < ctx->input().length())
228+
ctx->ConfirmCurrentSelection();
229+
ctx->Commit();
228230
} else if (style == kAsciiModeSwitchCommitCode) {
229231
ctx->ClearNonConfirmedComposition();
230232
ctx->Commit();

0 commit comments

Comments
 (0)