Place cursor after inserted suffix

master
Yevgen Muntyan 2006-12-07 03:16:32 -06:00
parent c6cdd5c63d
commit 49ce9a2473
1 changed files with 6 additions and 0 deletions

View File

@ -312,8 +312,14 @@ moo_completion_simple_complete (MooTextCompletion *text_cmpl,
end = start;
gtk_text_iter_forward_to_line_end (&end);
old_suffix = gtk_text_iter_get_slice (&start, &end);
if (!strncmp (group->suffix, old_suffix, strlen (group->suffix)))
{
do_insert = FALSE;
gtk_text_iter_forward_chars (&start, g_utf8_strlen (group->suffix, -1));
set_cursor = TRUE;
}
g_free (old_suffix);
}