SF.net SVN: geany: [1915] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Sep 27 15:10:23 UTC 2007
Revision: 1915
http://geany.svn.sourceforge.net/geany/?rev=1915&view=rev
Author: ntrel
Date: 2007-09-27 08:10:22 -0700 (Thu, 27 Sep 2007)
Log Message:
-----------
Fix displaying error indicators with Make after entering a
subdirectory.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-09-27 15:09:54 UTC (rev 1914)
+++ trunk/ChangeLog 2007-09-27 15:10:22 UTC (rev 1915)
@@ -13,6 +13,11 @@
Don't show file opened/saved/closed messages on the status bar.
Add temporary function msgwin_status_add_new() for v0.12 (to avoid
many code changes updating msgwin_status_add() before the release).
+ * src/utils.h, src/keyfile.c:
+ Fix possible conflict of 'tmp' variable name in setptr macro.
+ * src/build.c, NEWS:
+ Fix displaying error indicators with Make after entering a
+ subdirectory.
2007-09-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-09-27 15:09:54 UTC (rev 1914)
+++ trunk/NEWS 2007-09-27 15:10:22 UTC (rev 1915)
@@ -9,6 +9,8 @@
* Fixed replacing with '^' or '$' regex chars.
* Fixed hang with Find All/Find Usage with '^' or '$' regex chars.
* Fixed hang when replacing all '[ ]*' regex matches (closes #1757748).
+ * Fixed displaying error indicators with Make after entering a
+ subdirectory.
Filetypes:
* Added reStructuredText filetype and parser.
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2007-09-27 15:09:54 UTC (rev 1914)
+++ trunk/src/build.c 2007-09-27 15:10:22 UTC (rev 1915)
@@ -57,6 +57,8 @@
BuildInfo build_info = {GBO_COMPILE, 0, NULL, GEANY_FILETYPES_ALL, NULL};
+static gchar *current_dir_entered = NULL;
+
static struct
{
GPid pid;
@@ -471,6 +473,7 @@
g_return_val_if_fail(DOC_IDX_VALID(idx), (GPid) 1);
clear_errors(idx);
+ setptr(current_dir_entered, NULL);
locale_filename = utils_get_locale_from_utf8(doc_list[idx].file_name);
executable = utils_remove_ext_from_filename(locale_filename);
@@ -796,7 +799,7 @@
if (cond & (G_IO_IN | G_IO_PRI))
{
//GIOStatus s;
- gchar *msg, *dir = NULL;
+ gchar *msg;
while (g_io_channel_read_line(ioc, &msg, NULL, NULL, NULL) && msg)
{
@@ -809,9 +812,7 @@
if (build_parse_make_dir(msg, &tmp))
{
- if (dir != NULL)
- g_free(dir);
- dir = tmp;
+ setptr(current_dir_entered, tmp);
}
if (editor_prefs.use_indicators)
@@ -819,10 +820,12 @@
gchar *filename;
gint line;
- msgwin_parse_compiler_error_line(msg, dir, &filename, &line);
+ msgwin_parse_compiler_error_line(msg, current_dir_entered,
+ &filename, &line);
if (line != -1 && filename != NULL)
{
gint idx = document_find_by_filename(filename, FALSE);
+
document_set_indicator(idx, line - 1); // will check valid idx
color = COLOR_RED; // error message parsed on the line
}
@@ -832,9 +835,6 @@
g_free(msg);
}
-
- if (dir != NULL)
- g_free(dir);
}
if (cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
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