SF.net SVN: geany: [2241] trunk/src
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Feb 10 12:34:28 UTC 2008
Revision: 2241
http://geany.svn.sourceforge.net/geany/?rev=2241&view=rev
Author: eht16
Date: 2008-02-10 04:34:28 -0800 (Sun, 10 Feb 2008)
Log Message:
-----------
Apply patch from Yura Siamashka to fix wrong navigation queue items (thanks).
Modified Paths:
--------------
trunk/src/navqueue.c
trunk/src/navqueue.h
trunk/src/symbols.c
trunk/src/treeviews.c
Modified: trunk/src/navqueue.c
===================================================================
--- trunk/src/navqueue.c 2008-02-08 23:26:20 UTC (rev 2240)
+++ trunk/src/navqueue.c 2008-02-10 12:34:28 UTC (rev 2241)
@@ -137,10 +137,8 @@
/* Adds the current document position to the queue before adding the new position.
* line is counted with 1 as the first line, not 0. */
-gboolean navqueue_goto_line(gint new_idx, gint line)
+gboolean navqueue_goto_line(gint old_idx, gint new_idx, gint line)
{
- gint old_idx = document_get_cur_idx();
-
g_return_val_if_fail(DOC_IDX_VALID(old_idx), FALSE);
g_return_val_if_fail(DOC_IDX_VALID(new_idx), FALSE);
g_return_val_if_fail(doc_list[new_idx].tm_file, FALSE);
Modified: trunk/src/navqueue.h
===================================================================
--- trunk/src/navqueue.h 2008-02-08 23:26:20 UTC (rev 2240)
+++ trunk/src/navqueue.h 2008-02-10 12:34:28 UTC (rev 2241)
@@ -32,7 +32,7 @@
void navqueue_free();
-gboolean navqueue_goto_line(gint new_idx, gint line);
+gboolean navqueue_goto_line(gint old_idx, gint new_idx, gint line);
void navqueue_go_back();
Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c 2008-02-08 23:26:20 UTC (rev 2240)
+++ trunk/src/symbols.c 2008-02-10 12:34:28 UTC (rev 2241)
@@ -1073,6 +1073,8 @@
gint type;
TMTag *tmtag;
+ gint old_idx = document_get_cur_idx();
+
// goto tag definition: all except prototypes / forward declarations / externs
type = (definition) ? tm_tag_max_t - forward_types : forward_types;
@@ -1087,7 +1089,7 @@
new_idx = document_open_file(tmtag->atts.entry.file->work_object.file_name, FALSE, NULL, NULL);
}
- if (navqueue_goto_line(new_idx, tmtag->atts.entry.line))
+ if (navqueue_goto_line(old_idx, new_idx, tmtag->atts.entry.line))
return TRUE;
}
// if we are here, there was no match and we are beeping ;-)
Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c 2008-02-08 23:26:20 UTC (rev 2240)
+++ trunk/src/treeviews.c 2008-02-10 12:34:28 UTC (rev 2241)
@@ -641,7 +641,7 @@
{
gint idx = document_get_cur_idx();
- navqueue_goto_line(idx, line);
+ navqueue_goto_line(idx, idx, line);
}
}
return FALSE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list