richedit: Handle case for EM_LINELENGTH when offset is between \r\n.
authorDylan Smith <dylan.ah.smith@gmail.com>
Tue, 27 Jan 2009 08:39:03 +0000 (03:39 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 27 Jan 2009 10:20:59 +0000 (11:20 +0100)
commitc94e78a5728ecc8ddde5b1d9f8395b2a11c99256
tree9c14abcd4b2ce04f1e77916b430224073e41374c
parent83ff6a5c5d3f9bf9fe7c5198362ead6afdda817c
richedit: Handle case for EM_LINELENGTH when offset is between \r\n.

I found that ME_FindItemAtOffset and ME_CursorFromCharOfs are used
almost identically, except for how they handle a character offset that
is between a carriage return and line feed.  In this case
ME_CursorFromCharOfs sets the cursor's run offset to 0, but
ME_FindItemAtOffset instead returns the next run which is what was
causing ME_LINELENGTH to incorrectly return the length of the next
line.
dlls/riched20/editor.c
dlls/riched32/tests/editor.c