]> git.wh0rd.org Git - nano.git/commitdiff
* rcfile.c - Add in specific check for UNDOABLE and fix declaration as
authorChris Allegretta <chrisa@asty.org>
Tue, 3 Nov 2009 19:31:17 +0000 (19:31 +0000)
committerChris Allegretta <chrisa@asty.org>
Tue, 3 Nov 2009 19:31:17 +0000 (19:31 +0000)
          to what flag it toggles.  Fixes undo mode being able to be called from
          the rc file, reported by Helmut Jarausch <jarausch@igpm.rwth-aachen.de>

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

ChangeLog
src/rcfile.c

index 5bbb3146c08b24baed704865faaeafd6a8278f63..9a4e067e8988ebbf177d26a9a73fb8e5f52a5b3e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-11-03 Chris Allegretta <chrisa@asty.org>
        * nano.h - Fix comma at end of enumerator list which angers -pedantic.
+       * rcfile.c - Add in specific check for UNDOABLE and fix declaration as
+         to what flag it toggles.  Fixes undo mode being able to be called from
+         the rc file, reported by Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
 
 2009-11-03 Mike Frysinger <vapier@gentoo.org>
        * files.c - Move up is_file_writable() to stop implicit definition complaints.
index decae7863ed97cd9a9fe15b4be405492130e520d..be1ba2ba20ddc0efc6f3378d3ecbea77ee212679 100644 (file)
@@ -89,7 +89,7 @@ static const rcoption rcopts[] = {
     {"smarthome", SMART_HOME},
     {"smooth", SMOOTH_SCROLL},
     {"tabstospaces", TABS_TO_SPACES},
-    {"undo", 0},
+    {"undo", UNDOABLE},
     {"whitespace", 0},
     {"wordbounds", WORD_BOUNDS},
     {"softwrap", SOFTWRAP},
@@ -1047,6 +1047,9 @@ void parse_rcfile(FILE *rcstream
                else
                    rcfile_error(N_("Cannot unset flag \"%s\""),
                        rcopts[i].name);
+               /* Looks like we still need this specific hack for undo */
+               if (strcasecmp(rcopts[i].name, "undo") == 0)
+                   shortcut_init(0);
                break;
            }
        }