Skip to content

Commit

Permalink
fix half-way commit text
Browse files Browse the repository at this point in the history
  • Loading branch information
groverlynn committed Nov 24, 2023
1 parent 3590d80 commit bd450af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rime/gear/ascii_composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ void AsciiComposer::SwitchAsciiMode(bool ascii_mode,
[this](Context* ctx) { OnContextUpdate(ctx); });
}
} else if (style == kAsciiModeSwitchCommitText) {
while (!ctx->input().empty())
ctx->ConfirmCurrentSelection();
ctx->ConfirmCurrentSelection();
if (!ctx->input().empty())
ctx->Commit();
} else if (style == kAsciiModeSwitchCommitCode) {
ctx->ClearNonConfirmedComposition();
ctx->Commit();
Expand Down

0 comments on commit bd450af

Please sign in to comment.