To: vim-dev@vim.org Subject: Patch 6.0.054 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.054 Problem: When using mswin.vim, CTRL-V pastes a block of text like it is normal text. Using CTRL-V in blockwise Visual mode leaves "x" characters behind. Solution: Make CTRL-V work as it should. Do the same for the Paste menu entries. Files: runtime/menu.vim, runtime/mswin.vim *** ../vim60.53/runtime/menu.vim Wed Oct 31 17:50:48 2001 --- runtime/menu.vim Wed Oct 31 16:47:20 2001 *************** *** 112,119 **** amenu 10.610 &File.Sa&ve-Exit:wqa :confirm wqa amenu 10.620 &File.E&xit:qa :confirm qa ! " Tricky stuff to make pasting work as expected. ! nnoremap Paste "=@+.'xy'gPFx"_2x:echo " Edit menu amenu 20.310 &Edit.&Undou u --- 112,131 ---- amenu 10.610 &File.Sa&ve-Exit:wqa :confirm wqa amenu 10.620 &File.E&xit:qa :confirm qa ! " Pasting blockwise and linewise selections is not possible in Insert and ! " Visual mode without the +virtualedit feature. They are pasted as if they ! " were characterwise instead. ! if has("virtualedit") ! nnoremap Paste :call Paste() ! func! Paste() ! let ove = &ve ! set ve=all ! normal `^"+gPi ! let &ve = ove ! endfunc ! else ! nnoremap Paste "=@+.'xy'gPFx"_2x ! endif " Edit menu amenu 20.310 &Edit.&Undou u *************** *** 123,132 **** vmenu 20.340 &Edit.Cu&t"+x "+x vmenu 20.350 &Edit.&Copy"+y "+y cmenu 20.350 &Edit.&Copy"+y ! nmenu 20.360 &Edit.&Paste"+P Paste ! vmenu &Edit.&Paste"+P "-cxPaste"_x ! imenu &Edit.&Paste"+P xPaste"_s cmenu &Edit.&Paste"+P + nmenu 20.370 &Edit.Put\ &Before[p [p imenu &Edit.Put\ &Before[p [p nmenu 20.380 &Edit.Put\ &After]p ]p --- 135,149 ---- vmenu 20.340 &Edit.Cu&t"+x "+x vmenu 20.350 &Edit.&Copy"+y "+y cmenu 20.350 &Edit.&Copy"+y ! nmenu 20.360 &Edit.&Paste"+P "+gP cmenu &Edit.&Paste"+P + + if has("virtualedit") + vmenu &Edit.&Paste"+P "-cPaste + imenu &Edit.&Paste"+P Pastegi + else + vmenu &Edit.&Paste"+P "-cgixPaste"_x + imenu &Edit.&Paste"+P xPaste"_s + endif nmenu 20.370 &Edit.Put\ &Before[p [p imenu &Edit.Put\ &Before[p [p nmenu 20.380 &Edit.Put\ &After]p ]p *************** *** 689,704 **** vmenu 1.20 PopUp.Cu&t "+x vmenu 1.30 PopUp.&Copy "+y cmenu 1.30 PopUp.&Copy ! nmenu 1.40 PopUp.&Paste Paste ! vmenu 1.40 PopUp.&Paste "-cxPaste"_x ! imenu 1.40 PopUp.&Paste xPaste"_s cmenu 1.40 PopUp.&Paste + vmenu 1.50 PopUp.&Delete x amenu 1.55 PopUp.-SEP2- : ! vnoremenu 1.60 PopUp.Select\ Blockwise anoremenu 1.70 PopUp.Select\ &Word vaw anoremenu 1.80 PopUp.Select\ &Line V ! anoremenu 1.90 PopUp.Select\ &Block anoremenu 1.100 PopUp.Select\ &All ggVG " The GUI toolbar (for MS-Windows and GTK) --- 706,726 ---- vmenu 1.20 PopUp.Cu&t "+x vmenu 1.30 PopUp.&Copy "+y cmenu 1.30 PopUp.&Copy ! nmenu 1.40 PopUp.&Paste "+gP cmenu 1.40 PopUp.&Paste + + if has("virtualedit") + vmenu 1.40 PopUp.&Paste "-cPaste + imenu 1.40 PopUp.&Paste Pastegi + else + vmenu 1.40 PopUp.&Paste "-cgixPaste"_x + imenu 1.40 PopUp.&Paste xPaste"_s + endif vmenu 1.50 PopUp.&Delete x amenu 1.55 PopUp.-SEP2- : ! vnoremenu 1.60 PopUp.Select\ Blockwise anoremenu 1.70 PopUp.Select\ &Word vaw anoremenu 1.80 PopUp.Select\ &Line V ! anoremenu 1.90 PopUp.Select\ &Block anoremenu 1.100 PopUp.Select\ &All ggVG " The GUI toolbar (for MS-Windows and GTK) *************** *** 725,734 **** vmenu 1.70 ToolBar.Cut "+x vmenu 1.80 ToolBar.Copy "+y cmenu 1.80 ToolBar.Copy ! nmenu 1.90 ToolBar.Paste Paste ! vmenu ToolBar.Paste "-cxPaste"_x ! imenu ToolBar.Paste xPaste"_s cmenu ToolBar.Paste + if !has("gui_athena") amenu 1.95 ToolBar.-sep3- --- 747,761 ---- vmenu 1.70 ToolBar.Cut "+x vmenu 1.80 ToolBar.Copy "+y cmenu 1.80 ToolBar.Copy ! nmenu 1.90 ToolBar.Paste "+gP cmenu ToolBar.Paste + + if has("virtualedit") + vmenu ToolBar.Paste "-cPaste + imenu ToolBar.Paste Pastegi + else + vmenu ToolBar.Paste "-cgixPaste"_x + imenu ToolBar.Paste xPaste"_s + endif if !has("gui_athena") amenu 1.95 ToolBar.-sep3- *** ../vim60.53/runtime/mswin.vim Thu Aug 23 13:50:05 2001 --- runtime/mswin.vim Tue Oct 30 14:41:41 2001 *************** *** 1,7 **** " Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar ! " Last change: 2001 Aug 23 " set the 'cpoptions' to its Vim default if 1 " only do this when compiled with expression evaluation --- 1,7 ---- " Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar ! " Last change: 2001 Oct 30 " set the 'cpoptions' to its Vim default if 1 " only do this when compiled with expression evaluation *************** *** 27,44 **** vnoremap "+y " CTRL-V and SHIFT-Insert are Paste ! nnoremap Paste "=@+.'xy'gPFx"_2x ! map Paste ! map Paste ! ! imap xPaste"_s ! imap xPaste"_s cmap + cmap + ! vmap "-cxPaste"_x ! vmap "-cxPaste"_x " Use CTRL-Q to do what CTRL-V used to do noremap --- 27,58 ---- vnoremap "+y " CTRL-V and SHIFT-Insert are Paste ! map "+gP ! map "+gP cmap + cmap + ! " Pasting blockwise and linewise selections is not possible in Insert and ! " Visual mode without the +virtualedit feature. They are pasted as if they ! " were characterwise instead. ! if has("virtualedit") ! nnoremap Paste :call Paste() ! func! Paste() ! let ove = &ve ! set ve=all ! normal `^"+gPi ! let &ve = ove ! endfunc ! imap Pastegi ! vmap "-cPaste ! else ! nnoremap Paste "=@+.'xy'gPFx"_2x ! imap xPaste"_s ! vmap "-cgixPaste"_x ! endif ! imap ! vmap " Use CTRL-Q to do what CTRL-V used to do noremap *** ../vim60.53/src/version.c Thu Nov 1 12:22:41 2001 --- src/version.c Thu Nov 1 14:29:48 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 54, /**/ -- SUPERIMPOSE "England AD 787". After a few more seconds we hear hoofbeats in the distance. They come slowly closer. Then out of the mist comes KING ARTHUR followed by a SERVANT who is banging two half coconuts together. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- 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 ///