Jacek Caban : mshtml: Fixed bound_pos handling in move_prev_chars.
Alexandre Julliard
julliard at winehq.org
Mon Feb 11 14:19:27 CST 2008
Module: wine
Branch: master
Commit: d992735dcc4a9dd04c30be50185fbb388101582b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d992735dcc4a9dd04c30be50185fbb388101582b
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Feb 10 19:47:21 2008 +0100
mshtml: Fixed bound_pos handling in move_prev_chars.
---
dlls/mshtml/txtrange.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c
index 7e505df..df8ee55 100644
--- a/dlls/mshtml/txtrange.c
+++ b/dlls/mshtml/txtrange.c
@@ -826,6 +826,7 @@ static long move_prev_chars(HTMLTxtRange *This, long cnt, const dompos_t *pos, B
{
dompos_t iter, tmp;
long ret = 0;
+ BOOL prev_eq = FALSE;
WCHAR c;
if(bounded)
@@ -847,14 +848,16 @@ static long move_prev_chars(HTMLTxtRange *This, long cnt, const dompos_t *pos, B
ret++;
- if(bound_pos && dompos_cmp(&iter, bound_pos)) {
+ if(prev_eq) {
*bounded = TRUE;
- cnt--;
+ ret++;
}
+
+ prev_eq = bound_pos && dompos_cmp(&iter, bound_pos);
}
*new_pos = iter;
- return bounded && *bounded ? ret+1 : ret;
+ return ret;
}
static long find_prev_space(HTMLTxtRange *This, const dompos_t *pos, BOOL first_space, dompos_t *ret)
More information about the wine-cvs
mailing list