mshtml: Fixed bound_pos handling in move_prev_chars.

This commit is contained in:
Jacek Caban 2008-02-10 19:47:21 +01:00 committed by Alexandre Julliard
parent 9f877fec9d
commit d992735dcc
1 changed files with 6 additions and 3 deletions

View File

@ -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)