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 Dec 3, 2023
1 parent bafe97f commit 50d333a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rime/gear/ascii_composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ void AsciiComposer::SwitchAsciiMode(bool ascii_mode,
[this](Context* ctx) { OnContextUpdate(ctx); });
}
} else if (style == kAsciiModeSwitchCommitText) {
ctx->ConfirmCurrentSelection();
while (ctx->composition().back().end < ctx->input().length())
ctx->ConfirmCurrentSelection();
ctx->Commit();
} else if (style == kAsciiModeSwitchCommitCode) {
ctx->ClearNonConfirmedComposition();
ctx->Commit();
Expand Down

0 comments on commit 50d333a

Please sign in to comment.