Skip to content

Commit

Permalink
Clear display attributes before ending composition (to workaround bug…
Browse files Browse the repository at this point in the history
…s of Word.)
  • Loading branch information
PCMan committed Sep 17, 2013
1 parent ce12f2a commit 500d3ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libIME/TextService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,12 @@ HRESULT TextService::doEndCompositionEditSession(TfEditCookie cookie, EndComposi
// move current insertion point to end of the composition string
ITfRange* compositionRange;
if(composition_->GetRange(&compositionRange) == S_OK) {
// clear display attribute for the composition range
ComPtr<ITfProperty> dispAttrProp;
if(session->context()->GetProperty(GUID_PROP_ATTRIBUTE, &dispAttrProp) == S_OK) {
dispAttrProp->Clear(cookie, compositionRange);
}

TF_SELECTION selection;
ULONG selectionNum;
if(session->context()->GetSelection(cookie, TF_DEFAULT_SELECTION, 1, &selection, &selectionNum) == S_OK) {
Expand Down

0 comments on commit 500d3ff

Please sign in to comment.