richedit: Don't put cursor in the table row start paragraph

Dylan Smith dylan.ah.smith at
Thu Sep 11 11:45:36 CDT 2008

This change is for the msftedit.dll implementation of tables.

The table row start paragraph is a hidden paragraph at the start of a
table row.  The cursor should not be at the start of this paragraph
without a selection.

The steps to produce the bug are the following:
1. Open a RTF file in wordpad that contains a table
2. Delete the text on the line before the table leaving it empty
3. Place the cursor on the empty line
4. Press delete
(The cursor should now be in the first cell, but previously was being
placed in the hidden table row start paragraph)
5. Press enter
(Previously this crashed the program because the table was corrupted by
inserting a newline at the table row start)

I found similar steps using backspace, undo, or redo.
 dlls/riched20/editor.c |    1 +
 dlls/riched20/editor.h |    1 +
 dlls/riched20/table.c  |   16 ++++++++++++++++
 dlls/riched20/undo.c   |    2 ++
 4 files changed, 20 insertions(+), 0 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Don-t-put-cursor-in-the-table-row-start.diff.txt

More information about the wine-patches mailing list