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.0.154 < prev    next >
Encoding:
Internet Message Format  |  2002-01-27  |  2.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.154
  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.0.154
  11. Problem:    MS-DOS and MS-Windows: The menu entries for xxd don't work when
  12.             there is no xxd in the path.
  13.             When converting back from Hex the filetype may remain "xxd" if it
  14.             is not detected.
  15. Solution:   When xxd is not in the path use the one in the runtime directory,
  16.             where the install program has put it.
  17.             Clear the 'filetype' option before detecting the new value.
  18. Files:      runtime/menu.vim
  19.  
  20.  
  21. *** ../vim60.153/runtime/menu.vim    Tue Jan 15 16:37:40 2002
  22. --- runtime/menu.vim    Mon Jan 28 15:18:11 2002
  23. ***************
  24. *** 429,435 ****
  25.     if has("vms")
  26.       %!mc vim:xxd
  27.     else
  28. !     %!xxd
  29.     endif
  30.     set ft=xxd
  31.     let &mod = mod
  32. --- 429,436 ----
  33.     if has("vms")
  34.       %!mc vim:xxd
  35.     else
  36. !     call s:XxdFind()
  37. !     exe "%!" . g:xxdprogram
  38.     endif
  39.     set ft=xxd
  40.     let &mod = mod
  41. ***************
  42. *** 440,449 ****
  43.     if has("vms")
  44.       %!mc vim:xxd -r
  45.     else
  46. !     %!xxd -r
  47.     endif
  48.     doautocmd filetypedetect BufReadPost
  49.     let &mod = mod
  50.   endfun
  51.   
  52.   " Setup the Tools.Compiler submenu
  53. --- 441,463 ----
  54.     if has("vms")
  55.       %!mc vim:xxd -r
  56.     else
  57. !     call s:XxdFind()
  58. !     exe "%!" . g:xxdprogram . " -r"
  59.     endif
  60. +   set ft=
  61.     doautocmd filetypedetect BufReadPost
  62.     let &mod = mod
  63. + endfun
  64. + func! s:XxdFind()
  65. +   if !exists("g:xxdprogram")
  66. +     " On the PC xxd may not be in the path but in the install directory
  67. +     if (has("win32") || has("dos32")) && !executable("xxd")
  68. +       let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe"
  69. +     else
  70. +       let g:xxdprogram = "xxd"
  71. +     endif
  72. +   endif
  73.   endfun
  74.   
  75.   " Setup the Tools.Compiler submenu
  76. *** ../vim60.153/src/version.c    Mon Jan 28 14:06:05 2002
  77. --- src/version.c    Mon Jan 28 15:19:25 2002
  78. ***************
  79. *** 608,609 ****
  80. --- 608,611 ----
  81.   {   /* Add new patch number below this line */
  82. + /**/
  83. +     154,
  84.   /**/
  85.  
  86. -- 
  87. hundred-and-one symptoms of being an internet addict:
  88. 91. It's Saturday afternoon in the middle of may and you are on computer.
  89.  
  90.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  91. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  92.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  93.