[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] another use for free_shortcutage()

From: David Lawrence Ramsey
Subject: [Nano-devel] another use for free_shortcutage()
Date: Tue, 19 Feb 2002 09:06:13 -0800 (PST)

Your free_shortcutage() function is apparently the key to
fixing the main_list shortcut overflow problem I mentioned a
few days ago.  I believe the following is needed to fix it
(and no, this is not a real diff, since I'm not in front of
my Linux box, but since all the changes are in
shortcut_init() in global.c, the context lines should make
it easy enough to find where to put the changes):
     char *nano_openprev_msg = "", *nano_opennext_msg = "";
+    int reinit_main_list = 0;
+    if (main_list) {
+       free_shortcutage(&main_list);
+       reinit_main_list = 1;
+    }
     nano_help_msg = _("Invoke the help menu");
     nano_writeout_msg = _("Write the current file to disk"); 
     sc_init_one(&main_list, -9, _("Next File"),
                    NANO_OPENNEXT_KEY, 0, 0, VIEW, open_nextfile_void);
+    if (reinit_main_list)
+       return;
     sc_init_one(&whereis_list, NANO_HELP_KEY,
                _("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
     sc_init_one(&whereis_list, NANO_CANCEL_KEY,
Let me know if it works.

Sluggy.Net: The Sluggy Freelance Community!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]