To:
[email protected]
Subject: Patch 6.0aw.008
Fcc: outbox
From: Bram Moolenaar <
[email protected]>
------------
Patch 6.0aw.008
Problem: When the first character of a file name is over 127, the Buffers
menu entry would get a negative priority and cause problems.
The "Edit.Find" menu didn't work like the "Edit.Find and Replace"
menu in Visual mode.
The toolbar item for printing didn't work like the Edit.Print menu
entry.
Solution: Reduce the multiplier for the first character when computing
the hash value for a Buffers menu entry.
Files: runtime/menu.vim
*** ../vim-6.0aw/runtime/menu.vim Sun Sep 16 22:20:43 2001
--- runtime/menu.vim Tue Sep 18 12:28:36 2001
***************
*** 2,8 ****
" Note that ":amenu" is often used to make a menu work in all modes.
"
" Maintainer: Bram Moolenaar <
[email protected]>
! " Last Change: 2001 Sep 09
" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
" <CR> would not be recognized. See ":help 'cpoptions'".
--- 2,8 ----
" Note that ":amenu" is often used to make a menu work in all modes.
"
" Maintainer: Bram Moolenaar <
[email protected]>
! " Last Change: 2001 Sep 18
" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
" <CR> would not be recognized. See ":help 'cpoptions'".
***************
*** 154,159 ****
--- 154,161 ----
amenu 20.405 &Edit.-SEP2- :
if has("win32") || has("win16") || has("gui_gtk") || has("gui_motif")
amenu 20.410 &Edit.&Find\.\.\. :promptfind<CR>
+ vunmenu &Edit.&Find\.\.\.
+ vmenu &Edit.&Find\.\.\. y:promptfind <C-R>"<CR>
amenu 20.420 &Edit.Find\ and\ Rep&lace\.\.\. :promptrepl<CR>
vunmenu &Edit.Find\ and\ Rep&lace\.\.\.
vmenu &Edit.Find\ and\ Rep&lace\.\.\. y:promptrepl <C-R>"<CR>
***************
*** 566,572 ****
let sp = char2nr(' ')
endif
" convert first six chars into a number for sorting:
! return (char2nr(nm[0]) - sp) * 0x1000000 + (char2nr(nm[1]) - sp) * 0x40000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x40 + (char2nr(nm[4]) - sp) * 0x40 + (char2nr(nm[5]) - sp)
endfunc
func! s:BMHash2(name)
--- 568,574 ----
let sp = char2nr(' ')
endif
" convert first six chars into a number for sorting:
! return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp)
endfunc
func! s:BMHash2(name)
***************
*** 720,737 ****
amenu 1.20 ToolBar.Save :w<CR>
amenu 1.30 ToolBar.SaveAll :wa<CR>
! if has("win32")
amenu 1.40 ToolBar.Print :hardcopy<CR>
vunmenu ToolBar.Print
vmenu ToolBar.Print :hardcopy<CR>
elseif has("vms")
amenu <silent> 1.40 ToolBar.Print :call VMSPrint(":")<CR>
vunmenu ToolBar.Print
! vmenu <silent> ToolBar.Print <Esc>:call VMSPrint(":'<,'>")<CR>
! else
! amenu 1.40 ToolBar.Print :w !lpr<CR>
! vunmenu ToolBar.Print
! vmenu ToolBar.Print <Esc>:w !lpr<CR>
endif
amenu 1.45 ToolBar.-sep1- <nul>
--- 722,739 ----
amenu 1.20 ToolBar.Save :w<CR>
amenu 1.30 ToolBar.SaveAll :wa<CR>
! if has("printer")
amenu 1.40 ToolBar.Print :hardcopy<CR>
vunmenu ToolBar.Print
vmenu ToolBar.Print :hardcopy<CR>
+ elseif has("unix")
+ amenu 1.40 ToolBar.Print :w !lpr<CR>
+ vunmenu ToolBar.Print
+ vmenu ToolBar.Print :w !lpr<CR>
elseif has("vms")
amenu <silent> 1.40 ToolBar.Print :call VMSPrint(":")<CR>
vunmenu ToolBar.Print
! vmenu <silent> ToolBar.Print <Esc>:call VMSPrint(":'<,'>")<CR>
endif
amenu 1.45 ToolBar.-sep1- <nul>
***************
*** 747,754 ****
imenu ToolBar.Paste x<Esc><SID>Paste"_s
cmenu ToolBar.Paste <C-R>+
- amenu 1.95 ToolBar.-sep3- <nul>
if !has("gui_athena")
amenu 1.100 ToolBar.Find :promptfind<CR>
amenu 1.110 ToolBar.FindNext n
amenu 1.120 ToolBar.FindPrev N
--- 749,756 ----
imenu ToolBar.Paste x<Esc><SID>Paste"_s
cmenu ToolBar.Paste <C-R>+
if !has("gui_athena")
+ amenu 1.95 ToolBar.-sep3- <nul>
amenu 1.100 ToolBar.Find :promptfind<CR>
amenu 1.110 ToolBar.FindNext n
amenu 1.120 ToolBar.FindPrev N
--
Linux is just like a wigwam: no Windows, no Gates and an Apache inside.
/// Bram Moolenaar --
[email protected] --
http://www.moolenaar.net \\\
((( Creator of Vim --
http://vim.sf.net --
ftp://ftp.vim.org/pub/vim )))
\\\ Help me helping AIDS orphans in Uganda -
http://iccf-holland.org ///