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.054 < prev    next >
Encoding:
Internet Message Format  |  2001-10-31  |  7.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.0.054
  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.054
  11. Problem:    When using mswin.vim, CTRL-V pastes a block of text like it is
  12.         normal text.  Using CTRL-V in blockwise Visual mode leaves "x"
  13.         characters behind.
  14. Solution:   Make CTRL-V work as it should.  Do the same for the Paste menu
  15.         entries.
  16. Files:        runtime/menu.vim, runtime/mswin.vim
  17.  
  18.  
  19. *** ../vim60.53/runtime/menu.vim    Wed Oct 31 17:50:48 2001
  20. --- runtime/menu.vim    Wed Oct 31 16:47:20 2001
  21. ***************
  22. *** 112,119 ****
  23.   amenu 10.610 &File.Sa&ve-Exit<Tab>:wqa        :confirm wqa<CR>
  24.   amenu 10.620 &File.E&xit<Tab>:qa        :confirm qa<CR>
  25.   
  26. ! " Tricky stuff to make pasting work as expected.
  27. ! nnoremap <SID>Paste "=@+.'xy'<CR>gPFx"_2x:echo<CR>
  28.   
  29.   " Edit menu
  30.   amenu 20.310 &Edit.&Undo<Tab>u            u
  31. --- 112,131 ----
  32.   amenu 10.610 &File.Sa&ve-Exit<Tab>:wqa        :confirm wqa<CR>
  33.   amenu 10.620 &File.E&xit<Tab>:qa        :confirm qa<CR>
  34.   
  35. ! " Pasting blockwise and linewise selections is not possible in Insert and
  36. ! " Visual mode without the +virtualedit feature.  They are pasted as if they
  37. ! " were characterwise instead.
  38. ! if has("virtualedit")
  39. !   nnoremap <silent> <SID>Paste :call <SID>Paste()<CR>
  40. !   func! <SID>Paste()
  41. !     let ove = &ve
  42. !     set ve=all
  43. !     normal `^"+gPi
  44. !     let &ve = ove
  45. !   endfunc
  46. ! else
  47. !   nnoremap <silent> <SID>Paste "=@+.'xy'<CR>gPFx"_2x
  48. ! endif
  49.   
  50.   " Edit menu
  51.   amenu 20.310 &Edit.&Undo<Tab>u            u
  52. ***************
  53. *** 123,132 ****
  54.   vmenu 20.340 &Edit.Cu&t<Tab>"+x            "+x
  55.   vmenu 20.350 &Edit.&Copy<Tab>"+y        "+y
  56.   cmenu 20.350 &Edit.&Copy<Tab>"+y        <C-Y>
  57. ! nmenu 20.360 &Edit.&Paste<Tab>"+P        <SID>Paste
  58. ! vmenu         &Edit.&Paste<Tab>"+P        "-cx<Esc><SID>Paste"_x
  59. ! imenu         &Edit.&Paste<Tab>"+P        x<Esc><SID>Paste"_s
  60.   cmenu         &Edit.&Paste<Tab>"+P        <C-R>+
  61.   nmenu 20.370 &Edit.Put\ &Before<Tab>[p        [p
  62.   imenu         &Edit.Put\ &Before<Tab>[p        <C-O>[p
  63.   nmenu 20.380 &Edit.Put\ &After<Tab>]p        ]p
  64. --- 135,149 ----
  65.   vmenu 20.340 &Edit.Cu&t<Tab>"+x            "+x
  66.   vmenu 20.350 &Edit.&Copy<Tab>"+y        "+y
  67.   cmenu 20.350 &Edit.&Copy<Tab>"+y        <C-Y>
  68. ! nmenu 20.360 &Edit.&Paste<Tab>"+P        "+gP
  69.   cmenu         &Edit.&Paste<Tab>"+P        <C-R>+
  70. + if has("virtualedit")
  71. +   vmenu         &Edit.&Paste<Tab>"+P        "-c<Esc><SID>Paste
  72. +   imenu         &Edit.&Paste<Tab>"+P        <Esc><SID>Pastegi
  73. + else
  74. +   vmenu         &Edit.&Paste<Tab>"+P        "-c<Esc>gix<Esc><SID>Paste"_x
  75. +   imenu         &Edit.&Paste<Tab>"+P        x<Esc><SID>Paste"_s
  76. + endif
  77.   nmenu 20.370 &Edit.Put\ &Before<Tab>[p        [p
  78.   imenu         &Edit.Put\ &Before<Tab>[p        <C-O>[p
  79.   nmenu 20.380 &Edit.Put\ &After<Tab>]p        ]p
  80. ***************
  81. *** 689,704 ****
  82.   vmenu 1.20 PopUp.Cu&t            "+x
  83.   vmenu 1.30 PopUp.&Copy            "+y
  84.   cmenu 1.30 PopUp.&Copy            <C-Y>
  85. ! nmenu 1.40 PopUp.&Paste            <SID>Paste
  86. ! vmenu 1.40 PopUp.&Paste            "-cx<Esc><SID>Paste"_x
  87. ! imenu 1.40 PopUp.&Paste            x<Esc><SID>Paste"_s
  88.   cmenu 1.40 PopUp.&Paste            <C-R>+
  89.   vmenu 1.50 PopUp.&Delete        x
  90.   amenu 1.55 PopUp.-SEP2-            :
  91. ! vnoremenu 1.60 PopUp.Select\ Blockwise    <C-Q>
  92.   anoremenu 1.70 PopUp.Select\ &Word    vaw
  93.   anoremenu 1.80 PopUp.Select\ &Line    V
  94. ! anoremenu 1.90 PopUp.Select\ &Block    <C-Q>
  95.   anoremenu 1.100 PopUp.Select\ &All    ggVG
  96.   
  97.   " The GUI toolbar (for MS-Windows and GTK)
  98. --- 706,726 ----
  99.   vmenu 1.20 PopUp.Cu&t            "+x
  100.   vmenu 1.30 PopUp.&Copy            "+y
  101.   cmenu 1.30 PopUp.&Copy            <C-Y>
  102. ! nmenu 1.40 PopUp.&Paste            "+gP
  103.   cmenu 1.40 PopUp.&Paste            <C-R>+
  104. + if has("virtualedit")
  105. +   vmenu 1.40 PopUp.&Paste        "-c<Esc><SID>Paste
  106. +   imenu 1.40 PopUp.&Paste        <Esc><SID>Pastegi
  107. + else
  108. +   vmenu 1.40 PopUp.&Paste        "-c<Esc>gix<Esc><SID>Paste"_x
  109. +   imenu 1.40 PopUp.&Paste        x<Esc><SID>Paste"_s
  110. + endif
  111.   vmenu 1.50 PopUp.&Delete        x
  112.   amenu 1.55 PopUp.-SEP2-            :
  113. ! vnoremenu 1.60 PopUp.Select\ Blockwise    <C-V>
  114.   anoremenu 1.70 PopUp.Select\ &Word    vaw
  115.   anoremenu 1.80 PopUp.Select\ &Line    V
  116. ! anoremenu 1.90 PopUp.Select\ &Block    <C-V>
  117.   anoremenu 1.100 PopUp.Select\ &All    ggVG
  118.   
  119.   " The GUI toolbar (for MS-Windows and GTK)
  120. ***************
  121. *** 725,734 ****
  122.     vmenu 1.70 ToolBar.Cut    "+x
  123.     vmenu 1.80 ToolBar.Copy    "+y
  124.     cmenu 1.80 ToolBar.Copy    <C-Y>
  125. !   nmenu 1.90 ToolBar.Paste    <SID>Paste
  126. !   vmenu      ToolBar.Paste    "-cx<Esc><SID>Paste"_x
  127. !   imenu      ToolBar.Paste    x<Esc><SID>Paste"_s
  128.     cmenu      ToolBar.Paste    <C-R>+
  129.   
  130.     if !has("gui_athena")
  131.       amenu 1.95 ToolBar.-sep3-        <nul>
  132. --- 747,761 ----
  133.     vmenu 1.70 ToolBar.Cut    "+x
  134.     vmenu 1.80 ToolBar.Copy    "+y
  135.     cmenu 1.80 ToolBar.Copy    <C-Y>
  136. !   nmenu 1.90 ToolBar.Paste    "+gP
  137.     cmenu      ToolBar.Paste    <C-R>+
  138. +   if has("virtualedit")
  139. +     vmenu      ToolBar.Paste    "-c<Esc><SID>Paste
  140. +     imenu      ToolBar.Paste    <Esc><SID>Pastegi
  141. +   else
  142. +     vmenu      ToolBar.Paste    "-c<Esc>gix<Esc><SID>Paste"_x
  143. +     imenu      ToolBar.Paste    x<Esc><SID>Paste"_s
  144. +   endif
  145.   
  146.     if !has("gui_athena")
  147.       amenu 1.95 ToolBar.-sep3-        <nul>
  148. *** ../vim60.53/runtime/mswin.vim    Thu Aug 23 13:50:05 2001
  149. --- runtime/mswin.vim    Tue Oct 30 14:41:41 2001
  150. ***************
  151. *** 1,7 ****
  152.   " Set options and add mapping such that Vim behaves a lot like MS-Windows
  153.   "
  154.   " Maintainer:    Bram Moolenaar <Bram@vim.org>
  155. ! " Last change:    2001 Aug 23
  156.   
  157.   " set the 'cpoptions' to its Vim default
  158.   if 1    " only do this when compiled with expression evaluation
  159. --- 1,7 ----
  160.   " Set options and add mapping such that Vim behaves a lot like MS-Windows
  161.   "
  162.   " Maintainer:    Bram Moolenaar <Bram@vim.org>
  163. ! " Last change:    2001 Oct 30
  164.   
  165.   " set the 'cpoptions' to its Vim default
  166.   if 1    " only do this when compiled with expression evaluation
  167. ***************
  168. *** 27,44 ****
  169.   vnoremap <C-Insert> "+y
  170.   
  171.   " CTRL-V and SHIFT-Insert are Paste
  172. ! nnoremap <silent> <SID>Paste "=@+.'xy'<CR>gPFx"_2x
  173. ! map <C-V>        <SID>Paste
  174. ! map <S-Insert>        <SID>Paste
  175. ! imap <C-V>        x<Esc><SID>Paste"_s
  176. ! imap <S-Insert>        x<Esc><SID>Paste"_s
  177.   
  178.   cmap <C-V>        <C-R>+
  179.   cmap <S-Insert>        <C-R>+
  180.   
  181. ! vmap <C-V>        "-cx<Esc><SID>Paste"_x
  182. ! vmap <S-Insert>        "-cx<Esc><SID>Paste"_x
  183.   
  184.   " Use CTRL-Q to do what CTRL-V used to do
  185.   noremap <C-Q>        <C-V>
  186. --- 27,58 ----
  187.   vnoremap <C-Insert> "+y
  188.   
  189.   " CTRL-V and SHIFT-Insert are Paste
  190. ! map <C-V>        "+gP
  191. ! map <S-Insert>        "+gP
  192.   
  193.   cmap <C-V>        <C-R>+
  194.   cmap <S-Insert>        <C-R>+
  195.   
  196. ! " Pasting blockwise and linewise selections is not possible in Insert and
  197. ! " Visual mode without the +virtualedit feature.  They are pasted as if they
  198. ! " were characterwise instead.
  199. ! if has("virtualedit")
  200. !   nnoremap <silent> <SID>Paste :call <SID>Paste()<CR>
  201. !   func! <SID>Paste()
  202. !     let ove = &ve
  203. !     set ve=all
  204. !     normal `^"+gPi
  205. !     let &ve = ove
  206. !   endfunc
  207. !   imap <C-V>        <Esc><SID>Pastegi
  208. !   vmap <C-V>        "-c<Esc><SID>Paste
  209. ! else
  210. !   nnoremap <silent> <SID>Paste "=@+.'xy'<CR>gPFx"_2x
  211. !   imap <C-V>        x<Esc><SID>Paste"_s
  212. !   vmap <C-V>        "-c<Esc>gix<Esc><SID>Paste"_x
  213. ! endif
  214. ! imap <S-Insert>          <C-V>
  215. ! vmap <S-Insert>          <C-V>
  216.   
  217.   " Use CTRL-Q to do what CTRL-V used to do
  218.   noremap <C-Q>        <C-V>
  219. *** ../vim60.53/src/version.c    Thu Nov  1 12:22:41 2001
  220. --- src/version.c    Thu Nov  1 14:29:48 2001
  221. ***************
  222. *** 608,609 ****
  223. --- 608,611 ----
  224.   {   /* Add new patch number below this line */
  225. + /**/
  226. +     54,
  227.   /**/
  228.  
  229. -- 
  230. SUPERIMPOSE "England AD 787".  After a few more seconds we hear hoofbeats in
  231. the distance.  They come slowly closer.  Then out of the mist comes KING
  232. ARTHUR followed by a SERVANT who is banging two half coconuts together.
  233.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  234.  
  235.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  236. (((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
  237.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  238.