Skip to content

Commit bd450af

Browse files
committed
fix half-way commit text
1 parent 3590d80 commit bd450af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rime/gear/ascii_composer.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ void AsciiComposer::SwitchAsciiMode(bool ascii_mode,
224224
[this](Context* ctx) { OnContextUpdate(ctx); });
225225
}
226226
} else if (style == kAsciiModeSwitchCommitText) {
227-
while (!ctx->input().empty())
228-
ctx->ConfirmCurrentSelection();
227+
ctx->ConfirmCurrentSelection();
228+
if (!ctx->input().empty())
229+
ctx->Commit();
229230
} else if (style == kAsciiModeSwitchCommitCode) {
230231
ctx->ClearNonConfirmedComposition();
231232
ctx->Commit();

0 commit comments

Comments
 (0)