Skip to content

Commit

Permalink
修复异步编辑请求
Browse files Browse the repository at this point in the history
  • Loading branch information
Techince committed Jan 25, 2024
1 parent f59a4f0 commit 66287eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions WeaselTSF/EditSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import Compartment;

STDAPI WeaselTSF::DoEditSession(TfEditCookie ec)
{
BOOL writeSession{};
_pEditSessionContext->InWriteSession(_tfClientId, &writeSession);
if (!writeSession)
return S_OK;

// get commit string from server
std::wstring commit;
weasel::Config config;
Expand Down
3 changes: 2 additions & 1 deletion WeaselTSF/KeyEventSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ STDAPI WeaselTSF::OnKeyUp(ITfContext* pContext, WPARAM wParam, LPARAM lParam, BO
else
{
_ProcessKeyEvent(wParam, lParam, pfEaten);
_UpdateComposition(pContext);
if (!GetBit(WeaselFlag::ASYNC_EDIT))
_UpdateComposition(pContext);
}

return S_OK;
Expand Down

0 comments on commit 66287eb

Please sign in to comment.