From 53a98c303f69e5e16b214b4e44ef7ebde3b67521 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 17 Dec 2011 23:00:53 +0100 Subject: [PATCH] Clear error indicators upon build start even if no document is given --- src/build.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/build.c b/src/build.c index 05ab82a7..95ec3a31 100644 --- a/src/build.c +++ b/src/build.c @@ -562,14 +562,13 @@ GeanyBuildCommand *build_get_current_menu_item(GeanyBuildGroup grp, gint cmd, gi /* Clear all error indicators in all documents. */ -static void clear_errors(GeanyDocument *doc) +static void clear_all_errors(void) { guint i; - for (i = 0; i < documents_array->len; i++) + foreach_document(i) { - if (documents[i]->is_valid) - editor_indicator_clear_errors(documents[i]->editor); + editor_indicator_clear_errors(documents[i]->editor); } } @@ -697,8 +696,7 @@ static GPid build_spawn_cmd(GeanyDocument *doc, const gchar *cmd, const gchar *d return (GPid) 1; } - if (doc != NULL) - clear_errors(doc); + clear_all_errors(); setptr(current_dir_entered, NULL); cmd_string = g_strdup(cmd);