[gnome-builder/wip/libide] libide: emit jump during insert/delete
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: emit jump during insert/delete
- Date: Fri, 13 Mar 2015 06:54:19 +0000 (UTC)
commit 01d64079205928e2f804cb39be7607a5b9928fc7
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 12 23:54:06 2015 -0700
libide: emit jump during insert/delete
libide/ide-source-view.c | 6 ++++--
libide/ide-source-view.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index ed02f41..9c02f97 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -1004,11 +1004,11 @@ ide_source_view__buffer_insert_text_cb (GtkTextBuffer *buffer,
g_assert (IDE_IS_SOURCE_VIEW (self));
ide_source_view_block_handlers (self);
-
if ((snippet = g_queue_peek_head (priv->snippets)))
ide_source_snippet_before_insert_text (snippet, buffer, iter, text, len);
-
ide_source_view_unblock_handlers (self);
+
+ ide_source_view_jump (self, iter);
}
static void
@@ -1064,6 +1064,8 @@ ide_source_view__buffer_delete_range_cb (GtkTextBuffer *buffer,
end_mark = ide_source_snippet_get_mark_end (snippet);
ide_source_view_invalidate_range_mark (self, begin_mark, end_mark);
}
+
+ ide_source_view_jump (self, begin);
}
static void
diff --git a/libide/ide-source-view.h b/libide/ide-source-view.h
index b0dc391..561c471 100644
--- a/libide/ide-source-view.h
+++ b/libide/ide-source-view.h
@@ -288,6 +288,8 @@ gboolean ide_source_view_get_snippet_completion (IdeSource
GType ide_source_view_get_type (void);
void ide_source_view_get_visible_rect (IdeSourceView *self,
GdkRectangle
*visible_rect);
+void ide_source_view_jump (IdeSourceView *self,
+ const GtkTextIter *location);
void ide_source_view_pop_snippet (IdeSourceView *self);
void ide_source_view_push_snippet (IdeSourceView *self,
IdeSourceSnippet *snippet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]