diff options
author | Suresh Chandrasekharan <suresh.chandrasekharan@sun.com> | 2003-08-15 00:56:34 +0800 |
---|---|---|
committer | Suresh Chandrasekharan <kcsuresh@src.gnome.org> | 2003-08-15 00:56:34 +0800 |
commit | 655c9cbf97de5f304784fdf2f1fcb9e258f526ca (patch) | |
tree | e879844849215765233fbc14788fae7147cb1348 /mail/e-searching-tokenizer.c | |
parent | 6d45ed28597a85c6b5dfa49aeeaf3911da76cf77 (diff) | |
download | gsoc2013-evolution-655c9cbf97de5f304784fdf2f1fcb9e258f526ca.tar.gz gsoc2013-evolution-655c9cbf97de5f304784fdf2f1fcb9e258f526ca.tar.zst gsoc2013-evolution-655c9cbf97de5f304784fdf2f1fcb9e258f526ca.zip |
Fix for 45818 ( i18n mail messages search only produces '[?]'). Now
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.
svn path=/trunk/; revision=22236
Diffstat (limited to 'mail/e-searching-tokenizer.c')
-rw-r--r-- | mail/e-searching-tokenizer.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); } |