aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuresh Chandrasekharan <suresh.chandrasekharan@sun.com>2003-08-15 00:56:34 +0800
committerSuresh Chandrasekharan <kcsuresh@src.gnome.org>2003-08-15 00:56:34 +0800
commit655c9cbf97de5f304784fdf2f1fcb9e258f526ca (patch)
treee879844849215765233fbc14788fae7147cb1348
parent6d45ed28597a85c6b5dfa49aeeaf3911da76cf77 (diff)
downloadgsoc2013-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
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/e-searching-tokenizer.c9
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);
}