[gtksourceview/gtksourcecompletion] Fixed incorrect use of get_word_iter
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtksourceview/gtksourcecompletion] Fixed incorrect use of get_word_iter
- Date: Fri, 24 Apr 2009 17:00:06 -0400 (EDT)
commit 08ae674d0588af0ca71b9acece9a61b22411ab2b
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Fri Apr 24 22:57:57 2009 +0200
Fixed incorrect use of get_word_iter
---
gtksourceview/gtksourcecompletion.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 3ba4038..46ff7b2 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -1039,16 +1039,19 @@ static void
update_typing_offsets (GtkSourceCompletion *completion)
{
GtkTextBuffer *buffer;
- GtkTextIter iter;
+ GtkTextIter start;
+ GtkTextIter end;
gchar *word;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (completion->priv->view));
word = gtk_source_completion_utils_get_word_iter (GTK_SOURCE_BUFFER (buffer),
- &iter, NULL);
+ NULL,
+ &start,
+ &end);
g_free (word);
- completion->priv->typing_line = gtk_text_iter_get_line (&iter);
- completion->priv->typing_line_offset = gtk_text_iter_get_line_offset (&iter);
+ completion->priv->typing_line = gtk_text_iter_get_line (&start);
+ completion->priv->typing_line_offset = gtk_text_iter_get_line_offset (&start);
}
static gboolean
@@ -1056,7 +1059,8 @@ show_auto_completion (GtkSourceCompletion *completion)
{
GtkTextBuffer *buffer;
GtkTextIter iter;
- GtkTextIter word_start;
+ GtkTextIter start;
+ GtkTextIter end;
gchar *word;
completion->priv->show_timed_out_id = 0;
@@ -1072,13 +1076,15 @@ show_auto_completion (GtkSourceCompletion *completion)
}
word = gtk_source_completion_utils_get_word_iter (GTK_SOURCE_BUFFER (buffer),
- &word_start, NULL);
+ &iter,
+ &start,
+ &end);
/* Check minimum amount of characters */
if (g_utf8_strlen (word, -1) >= completion->priv->minimum_auto_complete_length)
{
gtk_source_completion_show (completion, completion->priv->interactive_providers,
- word, &word_start);
+ word, &start);
}
g_free (word);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]