4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Mac: Using a menu name that only has a mnemonic or accelerator
12 causes a crash. (Elliot Shank)
13 Solution: Check for an empty menu name. Also delete empty submenus that
14 were created before detecting the error.
18 *** ../vim-7.0.053/src/menu.c Wed May 3 23:28:47 2006
19 --- src/menu.c Tue Aug 8 20:53:25 2006
23 * name (without mnemonic and accelerator text). */
24 next_name = menu_name_skip(name);
25 dname = menu_text(name, NULL, NULL);
30 + /* Only a mnemonic or accelerator is not valid. */
31 + EMSG(_("E792: Empty menu name"));
35 /* See if it's already there */
44 if (pri_tab[pri_idx + 1] != -1)
54 + /* Delete any empty submenu we added before discovering the error. Repeat
55 + * for higher levels. */
56 + while (parent != NULL && parent->children == NULL)
58 + if (parent->parent == NULL)
61 + menup = &parent->parent->children;
62 + for ( ; *menup != NULL && *menup != parent; menup = &((*menup)->next))
64 + if (*menup == NULL) /* safety check */
66 + parent = parent->parent;
72 *** ../vim-7.0.053/src/version.c Tue Aug 15 22:26:04 2006
73 --- src/version.c Wed Aug 16 15:53:39 2006
77 { /* Add new patch number below this line */
83 hundred-and-one symptoms of being an internet addict:
84 156. You forget your friend's name but not her e-mail address.
86 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
87 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
88 \\\ download, build and distribute -- http://www.A-A-P.org ///
89 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///