From 1067841a7bf83a895416ba75fa1067dd4e418d7b Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Thu, 22 Aug 2019 15:51:00 +0100 Subject: [PATCH] build_menu_update: Only enable next/prev error items when errors found --- src/build.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/build.c b/src/build.c index 12b00bd07..4c9f4ebb2 100644 --- a/src/build.c +++ b/src/build.c @@ -1471,7 +1471,9 @@ void build_menu_update(GeanyDocument *doc) doc = document_get_current(); have_path = doc != NULL && doc->file_name != NULL; build_running = build_info.pid > (GPid) 1; - have_errors = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(msgwindow.store_compiler), NULL) > 0; + // note: compiler list store may have been cleared since last build + have_errors = build_info.message_count > 0 && + gtk_tree_model_iter_n_children(GTK_TREE_MODEL(msgwindow.store_compiler), NULL) > 0; for (i = 0; build_menu_specs[i].build_grp != MENU_DONE; ++i) { struct BuildMenuItemSpec *bs = &(build_menu_specs[i]); -- 2.11.4.GIT