2005-07-20 [colin] 1.9.12cvs87
[claws.git] / src / textview.c
index ac22ffec6c6e3236a2a2310a2503660cdc7c4d42..09c59dc3545e74cdefba161f0e0bc79f859a5967 100644 (file)
@@ -1160,11 +1160,6 @@ static void textview_make_clickable_parts(TextView *textview,
        GtkTextIter iter;
        gchar *mybuf = g_strdup(linebuf);
        
-       if (!g_utf8_validate(linebuf, -1, NULL)) {
-               mybuf = g_malloc(strlen(linebuf)*2 +1);
-               conv_localetodisp(mybuf, strlen(linebuf)*2 +1, linebuf);
-       }
-
        /* parse table - in order of priority */
        struct table {
                const gchar *needle; /* token */
@@ -1201,6 +1196,11 @@ static void textview_make_clickable_parts(TextView *textview,
                struct txtpos   *next;          /* next */
        } head = {NULL, NULL, 0,  NULL}, *last = &head;
 
+       if (!g_utf8_validate(linebuf, -1, NULL)) {
+               mybuf = g_malloc(strlen(linebuf)*2 +1);
+               conv_localetodisp(mybuf, strlen(linebuf)*2 +1, linebuf);
+       }
+
        gtk_text_buffer_get_end_iter(buffer, &iter);
 
        /* parse for clickable parts, and build a list of begin and end positions  */