[gnome-builder] editor: avoid brace overwrite when in snippet tab stop.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor: avoid brace overwrite when in snippet tab stop.
- Date: Fri, 16 Jan 2015 01:41:25 +0000 (UTC)
commit 6a6bdf5591f2d4aaa8762d0b470d9de35bf2c37d
Author: Christian Hergert <christian hergert me>
Date: Thu Jan 15 17:41:19 2015 -0800
editor: avoid brace overwrite when in snippet tab stop.
It get's pretty annoying when this breaks, so just avoid the fancy
overwrite feature if we are in a snippet tab stop.
src/editor/gb-source-view.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index 141991a..6c932af 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -1323,6 +1323,16 @@ gb_source_view_maybe_overwrite (GbSourceView *view,
if (!view->priv->overwrite_braces)
return;
+ /*
+ * WORKAROUND:
+ *
+ * If we are inside of a snippet, then let's not do anything. It really
+ * messes with the position tracking. Once we can better integrate these
+ * things, go ahead and remove this.
+ */
+ if (view->priv->snippets->length)
+ return;
+
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
mark = gtk_text_buffer_get_insert (buffer);
gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]