Loading ...
Sorry, an error occurred while loading the content.

Patch 6.1.121

Expand Messages
  • Bram Moolenaar
    Patch 6.1.121 (depends on 6.1.098) Problem: When starting Select mode from Insert mode, then using the Paste menu entry, the cursor is left before the laste
    Message 1 of 1 , Jul 4, 2002
    • 0 Attachment
      Patch 6.1.121 (depends on 6.1.098)
      Problem: When starting Select mode from Insert mode, then using the Paste
      menu entry, the cursor is left before the laste pasted character.
      (Mario Schweigler)
      Solution: Set the cursor for Insert mode one character to the right.
      Files: runtime/menu.vim


      *** ../vim61.120/runtime/menu.vim Tue Jun 18 21:26:55 2002
      --- runtime/menu.vim Thu Jun 27 10:13:37 2002
      ***************
      *** 2,8 ****
      " You can also use this as a start for your own set of menus.
      "
      " Maintainer: Bram Moolenaar <Bram@...>
      ! " Last Change: 2002 May 15

      " Note that ":an" (short for ":anoremenu") is often used to make a menu work
      " in all modes and avoid side effects from mappings defined by the user.
      --- 2,8 ----
      " You can also use this as a start for your own set of menus.
      "
      " Maintainer: Bram Moolenaar <Bram@...>
      ! " Last Change: 2002 Jun 27

      " Note that ":an" (short for ":anoremenu") is often used to make a menu work
      " in all modes and avoid side effects from mappings defined by the user.
      ***************
      *** 119,131 ****

      " 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 <silent> <script> <SID>Paste :call <SID>Paste()<CR>
      func! <SID>Paste()
      let ove = &ve
      set ve=all
      ! normal `^"+gPi
      let &ve = ove
      endfunc
      else
      --- 119,140 ----

      " 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. Add to that some tricks to leave the cursor in
      ! " the right position, also for "gi".
      if has("virtualedit")
      nnoremap <silent> <script> <SID>Paste :call <SID>Paste()<CR>
      func! <SID>Paste()
      let ove = &ve
      set ve=all
      ! normal `^
      ! if @+ != ''
      ! normal "+gP
      ! endif
      ! let c = col(".")
      ! normal i
      ! if col(".") < c " compensate for i<ESC> moving the cursor left
      ! normal l
      ! endif
      let &ve = ove
      endfunc
      else
      *** ../vim61.120/src/version.c Thu Jul 4 20:45:15 2002
      --- src/version.c Thu Jul 4 20:46:40 2002
      ***************
      *** 608,609 ****
      --- 608,611 ----
      { /* Add new patch number below this line */
      + /**/
      + 121,
      /**/

      --
      Arthur pulls Pin out. The MONK blesses the grenade as ...
      ARTHUR: (quietly) One, two, five ...
      GALAHAD: Three, sir!
      ARTHUR: Three.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.