summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-10-01 07:31:47 -0400
committerTingPing <tingping@tingping.se>2013-10-03 16:23:34 -0400
commit6c3d201070ddcf18fab83c65991123febe3ed033 (patch)
treef8e0edc4a5bc9d7d192a20930dcafb17e883c060 /src/fe-gtk
parentaf2458f556775c5b709ac8c23666b5ffb854687f (diff)
libsexy: fix spell-check on contractions
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/sexy-spell-entry.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c
index ddf54a42..2f87dd91 100644
--- a/src/fe-gtk/sexy-spell-entry.c
+++ b/src/fe-gtk/sexy-spell-entry.c
@@ -1074,7 +1074,7 @@ entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gint **ends)
 
 	layout = gtk_entry_get_layout(GTK_ENTRY(entry));
 	text = gtk_entry_get_text(GTK_ENTRY(entry));
-	pango_layout_get_log_attrs(layout, &log_attrs, &n_attrs);
+	log_attrs = pango_layout_get_log_attrs_readonly (layout, &n_attrs);
 
 	/* Find how many words we have */
 	n_strings = 0;
@@ -1094,7 +1094,7 @@ entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gint **ends)
 
 			/* Find the end of this string */
 			cend = i;
-			while (!(log_attrs[cend].is_word_end))
+			while ((!log_attrs[cend].is_word_end || !log_attrs[cend].is_word_boundary))
 				cend++;
 
 			/* Copy sub-string */
@@ -1109,8 +1109,6 @@ entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gint **ends)
 			j++;
 		}
 	}
-
-	g_free (log_attrs);
 }
 
 static void