diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-20 08:41:23 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-20 08:41:23 +0000 |
commit | 3f7a1411acb0cbb6b2df06134e42e596257c3051 (patch) | |
tree | 3e0c82750240fd8b72efb650136391110b09dd36 /src/compose.c | |
parent | 8945c06437dca9a40882ccd7a768c63c47a70366 (diff) |
compose_is_itemized(): also check for enumerated lines such as (1), (2), ...
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@846 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r-- | src/compose.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/compose.c b/src/compose.c index ed44889e..b62b50ec 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2119,9 +2119,29 @@ static gboolean compose_is_itemized(GtkTextBuffer *buffer, } clen = g_unichar_to_utf8(wc, ch); + + /* (1), 2) etc. */ + if ((clen == 1 && ch[0] == '(') || g_unichar_isdigit(wc)) { + if (ch[0] == '(') + gtk_text_iter_forward_char(&iter); + + while (1) { + wc = gtk_text_iter_get_char(&iter); + clen = g_unichar_to_utf8(wc, ch); + if (g_unichar_isdigit(wc)) + gtk_text_iter_forward_char(&iter); + else if (clen == 1 && ch[0] == ')') { + gtk_text_iter_forward_char(&iter); + wc = gtk_text_iter_get_char(&iter); + if (g_unichar_isspace(wc)) + return TRUE; + } else + return FALSE; + } + } + if (clen != 1) return FALSE; - if (!strchr("*-+", ch[0])) return FALSE; |