nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 5726514869fbac0a9cd6bb13348c295c5763844c
parent 88234c90bc89832c626d166475010428b580b40b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 25 Mar 2018 21:41:46 +0200

linting: drop messages for other files when configured for one buffer

This fixes https://savannah.gnu.org/bugs/?53445.

Diffstat:
Msrc/text.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -3198,19 +3198,21 @@ void do_linter(void) while (TRUE) { int kbinput; functionptrtype func; -#ifdef ENABLE_MULTIBUFFER struct stat lintfileinfo; if (stat(curlint->filename, &lintfileinfo) != -1 && openfile->current_stat->st_ino != lintfileinfo.st_ino) { openfilestruct *tmpof = openfile; +#ifdef ENABLE_MULTIBUFFER while (tmpof != openfile->next) { if (tmpof->current_stat->st_ino == lintfileinfo.st_ino) break; tmpof = tmpof->next; } +#endif if (tmpof->current_stat->st_ino != lintfileinfo.st_ino) { +#ifdef ENABLE_MULTIBUFFER char *msg = charalloc(1024 + strlen(curlint->filename)); int i; @@ -3225,6 +3227,7 @@ void do_linter(void) } else if (i == 1) { open_buffer(curlint->filename, TRUE); } else { +#endif char *dontwantfile = mallocstrcpy(NULL, curlint->filename); lintstruct *restlint = NULL; @@ -3259,10 +3262,11 @@ void do_linter(void) free(dontwantfile); } +#ifdef ENABLE_MULTIBUFFER } else openfile = tmpof; +#endif } -#endif /* ENABLE_MULTIBUFFER */ if (tmplint != curlint) { goto_line_posx(curlint->lineno, curlint->colno - 1);