user32: Recalculate string length when cropping string to fit.

This commit is contained in:
Aric Stewart 2011-10-19 08:37:25 -05:00 committed by Alexandre Julliard
parent ec3d0e9b5c
commit 67196377b5
1 changed files with 1 additions and 0 deletions

View File

@ -2489,6 +2489,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac
while ((es->text_width > fw) && s + strl >= s) { while ((es->text_width > fw) && s + strl >= s) {
strcpyW(es->text + s + strl - 1, es->text + s + strl); strcpyW(es->text + s + strl - 1, es->text + s + strl);
strl--; strl--;
es->text_length = -1;
EDIT_InvalidateUniscribeData(es); EDIT_InvalidateUniscribeData(es);
EDIT_CalcLineWidth_SL(es); EDIT_CalcLineWidth_SL(es);
} }