diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/e-searching-tokenizer.c | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index b74f1dcdf6..5fbc2b873d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2003-08-13 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com> + + * e-searching-tokenizer.c (searcher_next_token): Fix for 45818 ( i18n + mail messages search only produces '[?]'). Now multibyte character + selection works correctly. But due to associated gtkhtml bug, the find + button functionallity for multibyte characters is broken. + 2003-08-12 Jeffrey Stedfast <fejj@ximian.com> * mail-tools.h: Removed unused function prototype. diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index 01e055ff84..44e88df378 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -717,7 +717,7 @@ static char * searcher_next_token(struct _searcher *s) { struct _token *token; - char *tok, *stok; + char *tok, *stok, *pre_tok; struct _trie *t = s->t; struct _state *q = s->state; struct _match *m = NULL; @@ -753,7 +753,7 @@ searcher_next_token(struct _searcher *s) } /* process whole token */ - stok = tok; + pre_tok = stok = tok; while ((c = camel_utf8_getc((const unsigned char **)&tok))) { if ((s->flags & SEARCH_CASE) == 0) c = g_unichar_tolower(c); @@ -765,7 +765,7 @@ searcher_next_token(struct _searcher *s) q = &t->root; } else if (m != NULL) { /* keep track of previous offsets of utf8 chars, rotating buffer */ - s->last[s->lastp] = s->offset + (tok-stok)-1; + s->last[s->lastp] = s->offset + (pre_tok-stok); s->lastp = (s->lastp+1)&s->last_mask; q = m->match; @@ -798,9 +798,10 @@ searcher_next_token(struct _searcher *s) } } } + pre_tok = tok; } - s->offset += (tok-stok)-1; + s->offset += (pre_tok-stok); flush_extra(s); } |