[anjuta] snippet-manager: bug fix in editing variables



commit d7e9fd434b4f095ae00929ca87d2ec77d4e4a7d5
Author: Dragos Dena <dragos dena gmail com>
Date:   Tue Jan 18 00:06:10 2011 +0200

    snippet-manager: bug fix in editing variables

 .../snippets-interaction-interpreter.c             |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/snippets-manager/snippets-interaction-interpreter.c b/plugins/snippets-manager/snippets-interaction-interpreter.c
index 9935542..350cd17 100644
--- a/plugins/snippets-manager/snippets-interaction-interpreter.c
+++ b/plugins/snippets-manager/snippets-interaction-interpreter.c
@@ -365,6 +365,8 @@ update_variables_values (SnippetsInteraction *snippets_interaction,
 		}
 	}
 	
+
+
 	priv->changing_values_blocker = FALSE;
 }
 
@@ -404,6 +406,7 @@ on_cur_editor_changed (IAnjutaEditor *cur_editor,
 {
 	SnippetsInteractionPrivate *priv = NULL;
 	gint sign = 0;
+	IAnjutaIterable *iter = NULL;
 
 	/* Assertions */
 	g_return_if_fail (ANJUTA_IS_SNIPPETS_INTERACTION (user_data));
@@ -426,6 +429,11 @@ on_cur_editor_changed (IAnjutaEditor *cur_editor,
 	                         sign * length,
 	                         text);
 
+	/* Clear the selection (if any) */
+	iter = ianjuta_editor_get_position (cur_editor, NULL);
+	ianjuta_editor_selection_set (IANJUTA_EDITOR_SELECTION(cur_editor),
+	                              iter, iter, FALSE, NULL);
+
 }
 
 static void
@@ -448,6 +456,7 @@ on_cur_editor_cursor_moved (IAnjutaEditor *cur_editor,
 		return;
 	g_return_if_fail (priv->editing_info != NULL);
 	cur_pos = ianjuta_editor_get_position (priv->cur_editor, NULL);
+
 	if (!IANJUTA_IS_EDITOR_SELECTION (priv->cur_editor))
 		return;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]