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.4.27 < prev    next >
Encoding:
Internet Message Format  |  1999-08-12  |  3.8 KB

  1. To: Mike Steed <mrsteed@usa.net>
  2. In-Reply-To: <19990813155859.14060.qmail@www0r.netaddress.usa.net>
  3. Cc: vim-dev@vim.org
  4. Subject: patch 5.4.27 (was: 5.4 popup menu bug (Win32))
  5. Fcc: outbox
  6. From: Bram Moolenaar <Bram@moolenaar.net>
  7. ------------
  8.  
  9. Mike Steed wrote:
  10.  
  11. >    Here's a problem (unpatched Vim-5.4, pardon me if this has been reported):
  12. >    gvim -u NONE -U NONE
  13. >    :amenu PopUp.Hello :echo 'Hello'^M
  14. >    (popup menu item works)
  15. >    :aunmenu PopUp.Hello
  16. >    (popup menu item still shows up in the menu and works)
  17. >    :aunmenu PopUp.Hello
  18. >    Vim says "No menu of that name".
  19. >    I hope this isn't yet another Win32 oddity that depends on my particular
  20. > version of IE, comctl*, etc., etc.
  21.  
  22. As Charles Campbell noted, there also is a problem on Motif.  I can reproduce
  23. both.
  24.  
  25. Hmm, I have it fixed now for Motif, but the menu is still there for Win32.
  26. Perhaps this has something to do with the tear-off items.  Or deleting PopUp
  27. menu items just doesn't work.
  28.  
  29.  
  30. Patch 5.4.27
  31. Problem:    Entries in the PopUp[nvic] menus were added for several modes, but
  32.         only deleted for the mode they were used for.  This resulted in
  33.         the  entry remaining in the PopUp menu.
  34.         When removing a PopUp[nvic] menu, the name had been truncated,
  35.         could result in greying-out the whole PopUp menu.
  36. Solution:   Remove entries for all modes from the PopUp[nvic] menus.  Remove
  37.         the PopUp[nvic] menu entries first, before the name is changed.
  38. Files:        src/menu.c
  39.  
  40.  
  41. *** ../vim-5.4.26/src/menu.c    Tue Aug 10 16:09:26 1999
  42. --- src/menu.c    Fri Aug 13 22:09:30 1999
  43. ***************
  44. *** 139,145 ****
  45.       {
  46.       if (STRCMP(menu_path, "*") == 0)    /* meaning: remove all menus */
  47.           menu_path = (char_u *)"";
  48. -     remove_menu(&root_menu, menu_path, modes, FALSE);
  49.   
  50.       /*
  51.        * For the PopUp menu, remove a menu for each mode separately.
  52. --- 139,144 ----
  53. ***************
  54. *** 152,162 ****
  55.               p = popup_mode_name(menu_path, i);
  56.               if (p != NULL)
  57.               {
  58. !             remove_menu(&root_menu, p, 1 << i, TRUE);
  59.               vim_free(p);
  60.               }
  61.           }
  62.       }
  63.       }
  64.       else
  65.       {
  66. --- 151,164 ----
  67.               p = popup_mode_name(menu_path, i);
  68.               if (p != NULL)
  69.               {
  70. !             remove_menu(&root_menu, p, MENU_ALL_MODES, TRUE);
  71.               vim_free(p);
  72.               }
  73.           }
  74.       }
  75. +     /* Careful: remove_menu() changes menu_path */
  76. +     remove_menu(&root_menu, menu_path, modes, FALSE);
  77.       }
  78.       else
  79.       {
  80. *** ../vim-5.4.26/src/version.h    Fri Aug 13 13:12:01 1999
  81. --- src/version.h    Fri Aug 13 22:07:14 1999
  82. ***************
  83. *** 19,26 ****
  84.   #define VIM_VERSION_MINOR_STR        "4"
  85.   #define VIM_VERSION_BUILD         57
  86.   #define VIM_VERSION_BUILD_STR        "57"
  87. ! #define VIM_VERSION_PATCHLEVEL         26
  88. ! #define VIM_VERSION_PATCHLEVEL_STR    "26"
  89.   
  90.   /*
  91.    * VIM_VERSION_NODOT is used for the runtime directory name.
  92. --- 19,26 ----
  93.   #define VIM_VERSION_MINOR_STR        "4"
  94.   #define VIM_VERSION_BUILD         57
  95.   #define VIM_VERSION_BUILD_STR        "57"
  96. ! #define VIM_VERSION_PATCHLEVEL         27
  97. ! #define VIM_VERSION_PATCHLEVEL_STR    "27"
  98.   
  99.   /*
  100.    * VIM_VERSION_NODOT is used for the runtime directory name.
  101. ***************
  102. *** 30,35 ****
  103.    */
  104.   #define VIM_VERSION_NODOT    "vim54"
  105.   #define VIM_VERSION_SHORT    "5.4"
  106. ! #define VIM_VERSION_MEDIUM    "5.4.26"
  107. ! #define VIM_VERSION_LONG    "VIM - Vi IMproved 5.4.26 (1999 Aug 13)"
  108. ! #define VIM_VERSION_LONG_DATE    "VIM - Vi IMproved 5.4.26 (1999 Aug 13, compiled "
  109. --- 30,35 ----
  110.    */
  111.   #define VIM_VERSION_NODOT    "vim54"
  112.   #define VIM_VERSION_SHORT    "5.4"
  113. ! #define VIM_VERSION_MEDIUM    "5.4.27"
  114. ! #define VIM_VERSION_LONG    "VIM - Vi IMproved 5.4.27 (1999 Aug 13)"
  115. ! #define VIM_VERSION_LONG_DATE    "VIM - Vi IMproved 5.4.27 (1999 Aug 13, compiled "
  116.  
  117. --
  118. hundred-and-one symptoms of being an internet addict:
  119. 84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE
  120.  
  121. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  122.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  123.