Commit bfac4379 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

riched20: Don't return the diTextStart paragraph from para_prev().

parent 02f4a178
......@@ -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 &para->prev_para->member.para;
if (para->prev_para && para->prev_para->type == diParagraph) return &para->prev_para->member.para;
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment