Branch: refs/heads/master Author: StephenWassell stephen.wassell@sophos.com Committer: GitHub noreply@github.com Date: Tue, 19 Jul 2016 14:21:00 UTC Commit: 7615549245f187866870cffa621e98165c010090 https://github.com/geany/geany-plugins/commit/7615549245f187866870cffa621e98...
Log Message: ----------- Go to correct line number when ctags search returns one item
Modified Paths: -------------- geanyctags/src/geanyctags.c
Modified: geanyctags/src/geanyctags.c 5 lines changed, 4 insertions(+), 1 deletions(-) =================================================================== @@ -414,6 +414,7 @@ static void find_tags(const gchar *name, gboolean declaration, gboolean case_sen gchar *tag_filename = NULL; tagEntry entry; tagFileInfo info; + int lastLineNumber = 0;
prj = geany_data->app->project; if (!prj) @@ -446,6 +447,7 @@ static void find_tags(const gchar *name, gboolean declaration, gboolean case_sen { path = g_build_filename(prj->base_path, entry.file, NULL); show_entry(&entry); + lastLineNumber = entry.address.lineNumber; num++; } @@ -456,6 +458,7 @@ static void find_tags(const gchar *name, gboolean declaration, gboolean case_sen if (!path) path = g_build_filename(prj->base_path, entry.file, NULL); show_entry(&entry); + lastLineNumber = entry.address.lineNumber; num++; } } @@ -465,7 +468,7 @@ static void find_tags(const gchar *name, gboolean declaration, gboolean case_sen GeanyDocument *doc = document_open_file(path, FALSE, NULL, NULL); if (doc != NULL) { - navqueue_goto_line(document_get_current(), doc, entry.address.lineNumber); + navqueue_goto_line(document_get_current(), doc, lastLineNumber); gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci)); } }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org