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 / 6.1.258 < prev    next >
Encoding:
Internet Message Format  |  2002-11-18  |  2.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.258
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.258
  11. Problem:    Buffers menu doesn't work properly for multibyte buffer names.
  12. Solution:   Use a pattern to get the left and right part of the name.
  13.         (Yasuhiro Matsumoto)
  14. Files:        runtime/menu.vim
  15.  
  16.  
  17. *** ../vim61.257/runtime/menu.vim    Sat Aug 24 23:19:56 2002
  18. --- runtime/menu.vim    Sun Nov 17 22:12:44 2002
  19. ***************
  20. *** 2,8 ****
  21.   " You can also use this as a start for your own set of menus.
  22.   "
  23.   " Maintainer:    Bram Moolenaar <Bram@vim.org>
  24. ! " Last Change:    2002 Aug 23
  25.   
  26.   " Note that ":an" (short for ":anoremenu") is often used to make a menu work
  27.   " in all modes and avoid side effects from mappings defined by the user.
  28. --- 2,8 ----
  29.   " You can also use this as a start for your own set of menus.
  30.   "
  31.   " Maintainer:    Bram Moolenaar <Bram@vim.org>
  32. ! " Last Change:    2002 Nov 17
  33.   
  34.   " Note that ":an" (short for ":anoremenu") is often used to make a menu work
  35.   " in all modes and avoid side effects from mappings defined by the user.
  36. ***************
  37. *** 665,675 ****
  38.     else
  39.       let len = strlen(name)
  40.       if len > g:bmenu_max_pathlen
  41. !       let amount = (g:bmenu_max_pathlen / 2) - 2
  42. !       let left = strpart(name, 0, amount)
  43. !       let amount = g:bmenu_max_pathlen - amount - 3
  44. !       let right = strpart(name, len - amount, amount)
  45. !       let name = left . '...' . right
  46.       endif
  47.     endif
  48.     return name
  49. --- 665,678 ----
  50.     else
  51.       let len = strlen(name)
  52.       if len > g:bmenu_max_pathlen
  53. !       let amountl = (g:bmenu_max_pathlen / 2) - 2
  54. !       let amountr = g:bmenu_max_pathlen - amountl - 3
  55. !       let pattern = '^\(.\{,' . amountl . '}\).\{-}\(.\{,' . amountr . '}\)$'
  56. !       let left = substitute(name, pattern, '\1', '')
  57. !       let right = substitute(name, pattern, '\2', '')
  58. !       if strlen(left) + strlen(right) < len
  59. !         let name = left . '...' . right
  60. !       endif
  61.       endif
  62.     endif
  63.     return name
  64. *** ../vim61.257/src/version.c    Tue Nov 19 11:21:32 2002
  65. --- src/version.c    Tue Nov 19 11:43:51 2002
  66. ***************
  67. *** 608,609 ****
  68. --- 608,611 ----
  69.   {   /* Add new patch number below this line */
  70. + /**/
  71. +     258,
  72.   /**/
  73.  
  74. -- 
  75. Ed's Radiator Shop: The Best Place in Town to Take a Leak.
  76.  
  77.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  78. ///          Creator of Vim - Vi IMproved -- http://www.vim.org          \\\
  79. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  80.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  81.