annotate runtime/autoload/paste.vim @ 30787:9f37bcd4d5c5 v9.0.0728

patch 9.0.0728: extend() test fails Commit: https://github.com/vim/vim/commit/a4962cd7bac8464d9f8d95d37614ecf595c5487e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 11 23:12:59 2022 +0100 patch 9.0.0728: extend() test fails Problem: extend() test fails. Solution: Item is final, not const.
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Oct 2022 00:15:03 +0200
parents fe57e4f0eac1
children 4027cefc2aab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
1 " Vim support file to help with paste mappings and menus
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
15729
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
3 " Last Change: 2019 Jan 27
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
4
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
5 " Define the string to use for items that are present both in Edit, Popup and
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
6 " Toolbar menu. Also used in mswin.vim and macmap.vim.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
7
15729
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
8 let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
9 let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
10 let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
11
15729
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
12 func! paste#Paste()
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
13 let ove = &ve
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
14 set ve=all
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
15 normal! `^
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
16 if @+ != ''
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
17 normal! "+gP
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
18 endif
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
19 let c = col(".")
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
20 normal! i
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
21 if col(".") < c " compensate for i<ESC> moving the cursor left
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
22 normal! l
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
23 endif
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
24 let &ve = ove
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
25 endfunc