[anjuta] Sets the caret position to the body of a callback.



commit 614eed37ac38c9ca7e41691216c0ab2fe0ffbea4
Author: Marco Diego Aurélio Mesquita <marcodiegomesquita gmail com>
Date:   Wed Feb 23 00:49:54 2011 -0300

    Sets the caret position to the body of a callback.

 plugins/language-support-cpp-java/plugin.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/plugin.c b/plugins/language-support-cpp-java/plugin.c
index dea5d7b..c06d818 100644
--- a/plugins/language-support-cpp-java/plugin.c
+++ b/plugins/language-support-cpp-java/plugin.c
@@ -536,6 +536,11 @@ on_glade_drop (IAnjutaEditor* editor,
 				ianjuta_editor_insert (editor, iterator,
 					                   str->str, -1, NULL);
 				g_string_free (str, TRUE);
+				/* Will now set the caret position to the center of the new callback */
+				ianjuta_editor_goto_line (editor,
+										  ianjuta_editor_get_line_from_position (
+														editor, iterator, NULL) + 4, NULL);
+
 				break;
 			}
 			case LS_FILE_CHDR:



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