aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-20 08:47:31 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-20 08:47:31 +0000
commitcf84cac1795e9141138a8c630ba8d5b516d24a47 (patch)
treed3fcb8d7a3689e56d086d69d183e40d31a31783b /src
parent3f7a1411acb0cbb6b2df06134e42e596257c3051 (diff)
modified compose_is_itemized().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@847 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/compose.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/compose.c b/src/compose.c
index b62b50ec..123d4df1 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -2120,17 +2120,23 @@ static gboolean compose_is_itemized(GtkTextBuffer *buffer,
clen = g_unichar_to_utf8(wc, ch);
- /* (1), 2) etc. */
+ /* (1), 2), 3. etc. */
if ((clen == 1 && ch[0] == '(') || g_unichar_isdigit(wc)) {
+ gboolean digit_appeared = FALSE;
+
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))
+ if (g_unichar_isdigit(wc)) {
+ digit_appeared = TRUE;
gtk_text_iter_forward_char(&iter);
- else if (clen == 1 && ch[0] == ')') {
+ } else if (clen == 1 &&
+ (ch[0] == ')' || ch[0] == '.')) {
+ if (!digit_appeared)
+ return FALSE;
gtk_text_iter_forward_char(&iter);
wc = gtk_text_iter_get_char(&iter);
if (g_unichar_isspace(wc))