Dylan Smith : richedit: Removed redundant ME_FindItemAtOffset using ME_RunOfsFromCharOfs.
Alexandre Julliard
julliard at winehq.org
Tue Jan 27 09:07:50 CST 2009
Module: wine
Branch: master
Commit: 61308257f238c2cdd079b0fb1fb35f6bac2127a4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=61308257f238c2cdd079b0fb1fb35f6bac2127a4
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Tue Jan 27 03:39:23 2009 -0500
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 | 9 ++++-
dlls/riched20/editor.c | 73 +++++++-----------------------------------
dlls/riched20/editor.h | 1 -
dlls/riched20/run.c | 83 ++++++++++++++++++++---------------------------
dlls/riched20/writer.c | 5 ++-
5 files changed, 57 insertions(+), 114 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=61308257f238c2cdd079b0fb1fb35f6bac2127a4
More information about the wine-cvs
mailing list