richedit: Removed redundant ME_FindItemAtOffset using ME_RunOfsFromCharOfs.
commit61308257f238c2cdd079b0fb1fb35f6bac2127a4
authorDylan Smith <dylan.ah.smith@gmail.com>
Tue, 27 Jan 2009 08:39:23 +0000 (27 03:39 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 27 Jan 2009 10:21:33 +0000 (27 11:21 +0100)
tree0fbc0556eb3b4c830d7b8edcbf2bcc824e7a0e08
parent61f189cec8cb9bcca8f60ac0f10cedb59bcf1cd9
richedit: Removed redundant ME_FindItemAtOffset using ME_RunOfsFromCharOfs.

The two functions ME_FindItemAtOffset and ME_RunOfsFromCharOfs were almost
identically used, since ME_FindItemAtOffset was always used to find a run.
The only difference was how they returned the offset within the run for an
end of paragraph run.

For ME_FindItemAtOffset it would return the next run if it was in between \r
and \n. ME_RunOfsFromCharOfs would instead return an nOffset of 0 for end
paragraph runs.  This subtle difference introduced bugs, so I decided to
avoid having special case in this function when creating this patch, and
instead let the caller handle this case.
dlls/riched20/caret.c
dlls/riched20/editor.c
dlls/riched20/editor.h
dlls/riched20/run.c
dlls/riched20/writer.c