]> git.wh0rd.org Git - nano.git/commitdiff
in do_toggle(), properly treat color syntax highlighting as enabled by
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 26 Jun 2005 20:05:01 +0000 (20:05 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 26 Jun 2005 20:05:01 +0000 (20:05 +0000)
default, and only treat wrapping as enabled by default when
DISABLE_WRAPPING isn't defined

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

ChangeLog
src/nano.c

index 6e10e3c42f3e69af14f5c431bbf5d563eeaeb5dd..6869dfbc295e70e1dcecec014c4feb36ddc4372b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -238,6 +238,10 @@ CVS code -
          (DLR)
        - Don't set current_len until after it's been asserted that both
          current and current->data aren't NULL. (DLR)
+  do_toggle()
+       - Properly treat color syntax highlighting as enabled by
+         default, and only treat wrapping as enabled by default when
+         DISABLE_WRAPPING isn't defined. (DLR)
   disable_extended_input()
        - Disable extended output processing as well as extended input
          processing, and rename to disable_extended_io(). (DLR)
index b0f51117e2772f975ab06b10078b462d7eaa9145..a495221da0e5cddd8157cc1b8e924347a796e0b1 100644 (file)
@@ -3723,8 +3723,14 @@ void do_toggle(const toggle *which)
 
     enabled = ISSET(which->flag);
 
-    if (which->val == TOGGLE_NOHELP_KEY ||
-       which->val == TOGGLE_WRAP_KEY)
+    if (which->val == TOGGLE_NOHELP_KEY
+#ifndef DISABLE_WRAPPING
+       || which->val == TOGGLE_WRAP_KEY
+#endif
+#ifdef ENABLE_COLOR
+       || which->val == TOGGLE_SYNTAX_KEY
+#endif
+       )
        enabled = !enabled;
 
     statusbar("%s %s", which->desc, enabled ? _("enabled") :