linter: do not pause when there are no messages for unopened files

Return immediately to editing mode when there are no messages for
the original file and the user does not wish to open any of the
included files that do have messages.

Also, reword the message that the linter gives then, and leave it
on the status bar (just like when Cancel is pressed).
master
Benno Schulenberg 2018-10-24 10:23:39 +02:00
parent 95dd873205
commit 477f63d8b5
1 changed files with 6 additions and 14 deletions

View File

@ -3215,9 +3215,7 @@ void do_linter(void)
if (i == -1) { if (i == -1) {
statusbar(_("Cancelled")); statusbar(_("Cancelled"));
currmenu = MMOST; break;
titlebar(NULL);
goto free_lints_and_return;
} else if (i == 1) { } else if (i == 1) {
open_buffer(curlint->filename, TRUE); open_buffer(curlint->filename, TRUE);
} else { } else {
@ -3248,10 +3246,7 @@ void do_linter(void)
free(dontwantfile); free(dontwantfile);
if (restlint == NULL) { if (restlint == NULL) {
statusbar(_("No more errors in unopened files, cancelling")); statusbar(_("No messages for this file"));
currmenu = MMOST;
titlebar(NULL);
napms(2400);
break; break;
} else { } else {
curlint = restlint; curlint = restlint;
@ -3289,8 +3284,7 @@ void do_linter(void)
tmplint = curlint; tmplint = curlint;
if (func == do_cancel || func == do_enter) { if (func == do_cancel || func == do_enter) {
currmenu = MMOST; wipe_statusbar();
titlebar(NULL);
break; break;
} else if (func == do_help_void) { } else if (func == do_help_void) {
tmplint = NULL; tmplint = NULL;
@ -3316,11 +3310,6 @@ void do_linter(void)
} }
} }
wipe_statusbar();
#ifdef ENABLE_MULTIBUFFER
free_lints_and_return:
#endif
for (curlint = lints; curlint != NULL;) { for (curlint = lints; curlint != NULL;) {
tmplint = curlint; tmplint = curlint;
curlint = curlint->next; curlint = curlint->next;
@ -3334,6 +3323,9 @@ void do_linter(void)
window_init(); window_init();
refresh_needed = TRUE; refresh_needed = TRUE;
} }
currmenu = MMOST;
titlebar(NULL);
} }
#endif /* ENABLE_COLOR */ #endif /* ENABLE_COLOR */