riched20: Don't return the diTextStart paragraph from para_prev().
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
02f4a178ff
commit
bfac43798b
|
@ -774,12 +774,10 @@ ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
|
|||
{
|
||||
para = run->para;
|
||||
/* Skip empty start of table row paragraph */
|
||||
if (para_prev( para )->nFlags & MEPF_ROWSTART)
|
||||
if (para_prev( para ) && para_prev( para )->nFlags & MEPF_ROWSTART)
|
||||
para = para_prev( para );
|
||||
/* Paragraph breaks are treated as separate words */
|
||||
if (para_get_di( para_prev( para ) )->type == diTextStart)
|
||||
return FALSE;
|
||||
|
||||
if (!para_prev( para )) return FALSE;
|
||||
para = para_prev( para );
|
||||
run = para_end_run( para );
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ ME_Paragraph *para_next( ME_Paragraph *para )
|
|||
|
||||
ME_Paragraph *para_prev( ME_Paragraph *para )
|
||||
{
|
||||
if (para->prev_para) return ¶->prev_para->member.para;
|
||||
if (para->prev_para && para->prev_para->type == diParagraph) return ¶->prev_para->member.para;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue