riched20: Make EM_LINELENGTH work correctly for non-final paragraphs containing exactly one screen line.
This commit is contained in:
parent
9667a891ff
commit
f07740b28b
|
@ -2154,8 +2154,8 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
item = ME_FindItemAtOffset(editor, diRun, wParam, NULL);
|
item = ME_FindItemAtOffset(editor, diRun, wParam, NULL);
|
||||||
item = ME_RowStart(item);
|
item = ME_RowStart(item);
|
||||||
nThisLineOfs = ME_CharOfsFromRunOfs(editor, ME_FindItemFwd(item, diRun), 0);
|
nThisLineOfs = ME_CharOfsFromRunOfs(editor, ME_FindItemFwd(item, diRun), 0);
|
||||||
item_end = ME_FindItemFwd(item, diStartRow);
|
item_end = ME_FindItemFwd(item, diStartRowOrParagraphOrEnd);
|
||||||
if (item_end)
|
if (item_end->type == diStartRow)
|
||||||
nNextLineOfs = ME_CharOfsFromRunOfs(editor, ME_FindItemFwd(item_end, diRun), 0);
|
nNextLineOfs = ME_CharOfsFromRunOfs(editor, ME_FindItemFwd(item_end, diRun), 0);
|
||||||
else
|
else
|
||||||
nNextLineOfs = ME_FindItemFwd(item, diParagraphOrEnd)->member.para.nCharOfs
|
nNextLineOfs = ME_FindItemFwd(item, diParagraphOrEnd)->member.para.nCharOfs
|
||||||
|
|
Loading…
Reference in New Issue