19 Aug
2024
19 Aug
'24
9:38 a.m.
Zhiyi Zhang (@zhiyi) commented about dlls/user32/edit.c:
EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); }
+static int EDIT_is_valid_format_rect(EDITSTATE *es, const RECT *rc) +{ + RECT edit_rect; + int text_height = es->line_height * es->line_count; + + GetClientRect(es->hwndSelf, &edit_rect); + if (rc->bottom == 0 && rc->top == 0 && rc->right == 0 && rc->left == 0) + return 0; + if (rc->top >= rc->bottom) + return 0; + if (rc->left >= rc->right) + return 0; Are these three checks above necessary? I think they are covered by the following checks. If not, I think you can use IsRectEmpty().
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6304#note_79094