2009-03-18 [paul] 3.7.1cvs21
[claws.git] / src / gtk / spell_entry.c
index 16ac905881a8bf3633c01fe28dad5ff76bd8dc9b..ba6a6d84f0cadb09cb1976dad83ea3947a05c1a3 100644 (file)
@@ -562,7 +562,7 @@ static void claws_spell_entry_populate_popup(ClawsSpellEntry *entry, GtkMenu *me
 {
        GtkAspell *gtkaspell = entry->gtkaspell;
        gint start, end;
-       gchar *word;
+       gchar *word, *text;
        
        if (gtkaspell == NULL)
                return;
@@ -575,7 +575,12 @@ static void claws_spell_entry_populate_popup(ClawsSpellEntry *entry, GtkMenu *me
        }
 
         gtkaspell->misspelled = word_misspelled(entry, start, end);
-        
+
+       text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
+       gtkaspell->start_pos  = g_utf8_pointer_to_offset(text, (text+start));
+       gtkaspell->end_pos    = g_utf8_pointer_to_offset(text, (text+end));
+       g_free(text);
+
         claws_spell_entry_context_set(entry);
         gtkaspell_make_context_menu(menu, gtkaspell);
 }