]> git.wh0rd.org Git - nano.git/commitdiff
It is better to say that this function is disabled
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 29 Jul 2015 17:36:39 +0000 (17:36 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Wed, 29 Jul 2015 17:36:39 +0000 (17:36 +0000)
than that no linter has been defined.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/text.c

index dfb8e9914158876d2afa1d37dda89151484bbb56..ff9cb82d9f851e80b3a0c7c981e2973c0f9a8204 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-29  Benno Schulenberg  <bensberg@justemail.net>
+       * 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-28  Benno Schulenberg  <bensberg@justemail.net>
        * src/text.c (do_formatter), src/nano.c (allow_pending_sigwinch):
        Reenable SIGWINCH-es also when invoking the formatter fails, and
index 810199eadbab13079e5c6daa6f4e390171eb3e06..7387efbe770d7eb9eb400e4f5ff42462159f89d6 100644 (file)
@@ -2903,6 +2903,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;