home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / old / 5.5.047 < prev    next >
Encoding:
Internet Message Format  |  1999-12-03  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.5.047
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.047
  8. Problem:    VMS: Crash when using the popup menu
  9. Solution:   Turn the #define MENU_MODE_CHARS into an array. (Arpadffy)
  10. Files:        src/structs.h, src/menu.c
  11.  
  12.  
  13. *** ../vim-5.5.46/src/structs.h    Wed Sep 22 10:06:19 1999
  14. --- src/structs.h    Thu Dec  2 17:43:04 1999
  15. ***************
  16. *** 878,886 ****
  17.   #define MENU_ALL_MODES        ((1 << MENU_INDEX_TIP) - 1)
  18.   /*note MENU_INDEX_TIP is not a 'real' mode*/
  19.   
  20. - /* The character for each menu mode */
  21. - #define MENU_MODE_CHARS        "nvoict"
  22.   /* Start a menu name with this to not include it on the main menu bar */
  23.   #define MNU_HIDDEN_CHAR        ']'
  24.   
  25. --- 878,883 ----
  26. *** ../vim-5.5.46/src/menu.c    Wed Sep 22 10:06:25 1999
  27. --- src/menu.c    Thu Dec  2 17:49:01 1999
  28. ***************
  29. *** 48,53 ****
  30. --- 48,56 ----
  31.   static int s_tearoffs = FALSE;
  32.   #endif
  33.   
  34. + /* The character for each menu mode */
  35. + static char_u    menu_mode_chars[] = {'n', 'v', 'o', 'i', 'c', 't'};
  36.   /*
  37.    * Do the :menu command and relatives.
  38.    */
  39. ***************
  40. *** 771,777 ****
  41.               return;
  42.           for (i = 0; i < depth + 2; i++)
  43.               MSG_PUTS("  ");
  44. !         msg_putchar(MENU_MODE_CHARS[bit]);
  45.           if (menu->noremap[bit])
  46.               msg_putchar('*');
  47.           else
  48. --- 774,780 ----
  49.               return;
  50.           for (i = 0; i < depth + 2; i++)
  51.               MSG_PUTS("  ");
  52. !         msg_putchar(menu_mode_chars[bit]);
  53.           if (menu->noremap[bit])
  54.               msg_putchar('*');
  55.           else
  56. ***************
  57. *** 1120,1126 ****
  58.       if (p != NULL)
  59.       {
  60.       mch_memmove(p + 6, p + 5, (size_t)(len - 4));
  61. !     p[5] = MENU_MODE_CHARS[idx];
  62.       }
  63.       return p;
  64.   }
  65. --- 1123,1129 ----
  66.       if (p != NULL)
  67.       {
  68.       mch_memmove(p + 6, p + 5, (size_t)(len - 4));
  69. !     p[5] = menu_mode_chars[idx];
  70.       }
  71.       return p;
  72.   }
  73. ***************
  74. *** 1367,1373 ****
  75.       mode = get_menu_mode();
  76.       if (mode == MENU_INDEX_INVALID)
  77.       return;
  78. !     mode = MENU_MODE_CHARS[mode];
  79.   
  80.       for (menu = root_menu; menu != NULL; menu = menu->next)
  81.       if (STRNCMP("PopUp", menu->name, 5) == 0 && menu->name[5] == mode)
  82. --- 1370,1376 ----
  83.       mode = get_menu_mode();
  84.       if (mode == MENU_INDEX_INVALID)
  85.       return;
  86. !     mode = menu_mode_chars[mode];
  87.   
  88.       for (menu = root_menu; menu != NULL; menu = menu->next)
  89.       if (STRNCMP("PopUp", menu->name, 5) == 0 && menu->name[5] == mode)
  90. *** ../vim-5.5.46/src/version.c    Sat Dec  4 13:53:43 1999
  91. --- src/version.c    Sat Dec  4 13:55:49 1999
  92. ***************
  93. *** 420,420 ****
  94. --- 420,421 ----
  95.   {   /* Add new patch number below this line */
  96. +     47,
  97.  
  98. -- 
  99. hundred-and-one symptoms of being an internet addict:
  100. 232. You start conversations with, "Have you gotten an ISDN line?"
  101.  
  102. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  103.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  104.