To: vim-dev@vim.org Subject: patch 5.5.047 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.047 Problem: VMS: Crash when using the popup menu Solution: Turn the #define MENU_MODE_CHARS into an array. (Arpadffy) Files: src/structs.h, src/menu.c *** ../vim-5.5.46/src/structs.h Wed Sep 22 10:06:19 1999 --- src/structs.h Thu Dec 2 17:43:04 1999 *************** *** 878,886 **** #define MENU_ALL_MODES ((1 << MENU_INDEX_TIP) - 1) /*note MENU_INDEX_TIP is not a 'real' mode*/ - /* The character for each menu mode */ - #define MENU_MODE_CHARS "nvoict" - /* Start a menu name with this to not include it on the main menu bar */ #define MNU_HIDDEN_CHAR ']' --- 878,883 ---- *** ../vim-5.5.46/src/menu.c Wed Sep 22 10:06:25 1999 --- src/menu.c Thu Dec 2 17:49:01 1999 *************** *** 48,53 **** --- 48,56 ---- static int s_tearoffs = FALSE; #endif + /* The character for each menu mode */ + static char_u menu_mode_chars[] = {'n', 'v', 'o', 'i', 'c', 't'}; + /* * Do the :menu command and relatives. */ *************** *** 771,777 **** return; for (i = 0; i < depth + 2; i++) MSG_PUTS(" "); ! msg_putchar(MENU_MODE_CHARS[bit]); if (menu->noremap[bit]) msg_putchar('*'); else --- 774,780 ---- return; for (i = 0; i < depth + 2; i++) MSG_PUTS(" "); ! msg_putchar(menu_mode_chars[bit]); if (menu->noremap[bit]) msg_putchar('*'); else *************** *** 1120,1126 **** if (p != NULL) { mch_memmove(p + 6, p + 5, (size_t)(len - 4)); ! p[5] = MENU_MODE_CHARS[idx]; } return p; } --- 1123,1129 ---- if (p != NULL) { mch_memmove(p + 6, p + 5, (size_t)(len - 4)); ! p[5] = menu_mode_chars[idx]; } return p; } *************** *** 1367,1373 **** mode = get_menu_mode(); if (mode == MENU_INDEX_INVALID) return; ! mode = MENU_MODE_CHARS[mode]; for (menu = root_menu; menu != NULL; menu = menu->next) if (STRNCMP("PopUp", menu->name, 5) == 0 && menu->name[5] == mode) --- 1370,1376 ---- mode = get_menu_mode(); if (mode == MENU_INDEX_INVALID) return; ! mode = menu_mode_chars[mode]; for (menu = root_menu; menu != NULL; menu = menu->next) if (STRNCMP("PopUp", menu->name, 5) == 0 && menu->name[5] == mode) *** ../vim-5.5.46/src/version.c Sat Dec 4 13:53:43 1999 --- src/version.c Sat Dec 4 13:55:49 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 47, -- hundred-and-one symptoms of being an internet addict: 232. You start conversations with, "Have you gotten an ISDN line?" --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /