Skip to content

Commit

Permalink
fix(composition): fix crashes in notebook with inline preedit
Browse files Browse the repository at this point in the history
- Use `TF_ES_ASYNCDONTCARE` to request all editsession
  • Loading branch information
nameoverflow committed Feb 25, 2018
1 parent b1d1ec4 commit 892930c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WeaselTSF/Composition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void WeaselTSF::_StartComposition(ITfContext *pContext, BOOL fCUASWorkaroundEnab
if ((pStartCompositionEditSession = new CStartCompositionEditSession(this, pContext, fCUASWorkaroundEnabled)) != NULL)
{
HRESULT hr;
pContext->RequestEditSession(_tfClientId, pStartCompositionEditSession, TF_ES_SYNC | TF_ES_READWRITE, &hr);
pContext->RequestEditSession(_tfClientId, pStartCompositionEditSession, TF_ES_ASYNCDONTCARE | TF_ES_READWRITE, &hr);
pStartCompositionEditSession->Release();
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@ void WeaselTSF::_EndComposition(ITfContext *pContext)

if ((pEditSession = new CEndCompositionEditSession(this, pContext, _pComposition)) != NULL)
{
pContext->RequestEditSession(_tfClientId, pEditSession, TF_ES_SYNC | TF_ES_READWRITE, &hr);
pContext->RequestEditSession(_tfClientId, pEditSession, TF_ES_ASYNCDONTCARE | TF_ES_READWRITE, &hr);
pEditSession->Release();
}
}
Expand Down

0 comments on commit 892930c

Please sign in to comment.