diff options
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; |