nano

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

commit 88c8da143fe0609ad8f7373e1c7dcb103bcd0dec
parent 367f84b0ecfcba26dbd3161d624ce97eaa7e529e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 24 Jan 2024 16:14:23 +0100

linter: do not mess up the input stream when the linter command is empty

Instead simply say that no linter is defined.

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

Bug existed since version 5.5, commit bc368133, but before
that commit nano would crash on an empty linter command.

Diffstat:
Msrc/text.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/text.c b/src/text.c @@ -2586,7 +2586,7 @@ void do_linter(void) if (in_restricted_mode()) return; - if (!openfile->syntax || !openfile->syntax->linter) { + if (!openfile->syntax || !openfile->syntax->linter || !*openfile->syntax->linter) { statusline(AHEM, _("No linter is defined for this type of file")); return; }