From 3af52152a8d8b56c15bbeb616607c178664780c9 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sun, 15 Nov 2015 06:39:14 +0000 Subject: [PATCH] Backport r5326 from trunk. git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_4_branch@5410 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 +++++ src/text.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8daf8c51..1fb3a69a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-07-29 Benno Schulenberg + * src/text.c (do_linter): When the linter is called in restricted mode + (possible when nano was built with --disable-speller), it is better to + say that this function is disabled than that no linter was defined. + 2015-07-26 Benno Schulenberg * src/search.c (do_replace_loop): When doing regex replacements, find each zero-length match only once. This fixes Savannah bug #45626. diff --git a/src/text.c b/src/text.c index 36cec500..2ff2f21e 100644 --- a/src/text.c +++ b/src/text.c @@ -2909,6 +2909,11 @@ void do_linter(void) char *convendptr = NULL; lintstruct *lints = NULL, *tmplint = NULL, *curlint = NULL; + if (ISSET(RESTRICTED)) { + nano_disabled_msg(); + return; + } + if (!openfile->syntax || !openfile->syntax->linter) { statusbar(_("No linter defined for this type of file!")); return; -- 2.39.5