Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com
-- v2: riched20: Commit and repaint after changing TextFont properties.
From: Jinoh Kang jinoh.kang.kr@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53170 Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/riched20/richole.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 3d88b8a65b0..b34276e77eb 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -805,6 +805,8 @@ static HRESULT set_textfont_prop(ITextFontImpl *font, enum textfont_prop_id prop cursor_from_char_ofs( services->editor, start, &from ); cursor_from_char_ofs( services->editor, end, &to ); ME_SetCharFormat( services->editor, &from, &to, &fmt ); + ME_CommitUndo( services->editor ); + ME_UpdateRepaint( services->editor, FALSE );
return S_OK; }
`ME_UpdateRepaint()` is supposed to be called when contents changes, not the formatting. Something like this: ```c ME_WrapMarkedParagraphs( services->editor ); ME_UpdateScrollBar( services->editor ); ``` is more appropriate here.
(Yes, the repaint logic is a mess).
This also applies to MR 268. FWIW, it would be easier from a reviewer standpoint if these two MRs were merged into one MR containing two commits.
(Yes, the repaint logic is a mess).
My sincere apologies for my offensive comment. I'm aware that, by nature, any of my impression of the codebase is subjective, and I always recognize that there is nobody to blame for it given the current situation even if the code was, indeed, "a mess." Also, I'll try to refrain from using language that may sound to someone like I'm condemning them.
This also applies to MR 268. FWIW, it would be easier from a reviewer standpoint if these two MRs were merged into one MR containing two commits.
ACK. I merged them into MR !284.
This merge request was closed by Jinoh Kang.