annotate runtime/autoload/paste.vim @ 34259:70c1a9c6f41d v9.1.0070

patch 9.1.0070: CI: testsuite not run on M1 Mac Commit: https://github.com/vim/vim/commit/e93d5cadec6323d6be90f1ec29066441ffbc9477 Author: rhysd <lin90162@yahoo.co.jp> Date: Thu Feb 1 21:22:14 2024 +0100 patch 9.1.0070: CI: testsuite not run on M1 Mac Problem: CI: testsuite not run on M1 Mac Solution: Make it run on gh runners for M1, disable failing tests for now, until we figure the problem with the failings tests out (rhysd) closes: #13943 Signed-off-by: rhysd <lin90162@yahoo.co.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 01 Feb 2024 21:30:03 +0100
parents 4027cefc2aab
children
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
32770
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 15729
diff changeset
2 " Maintainer: The Vim Project <https://github.com/vim/vim>
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 15729
diff changeset
3 " Last Change: 2023 Aug 10
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 15729
diff changeset
4 " Former Maintainer: Bram Moolenaar <Bram@vim.org>
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
5
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
6 " 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
7 " Toolbar menu. Also used in mswin.vim and macmap.vim.
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
8
15729
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
9 let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
10 let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
11 let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP"
718
7b21554be7a1 updated for version 7.0219
vimboss
parents:
diff changeset
12
15729
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
13 func! paste#Paste()
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
14 let ove = &ve
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
15 set ve=all
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
16 normal! `^
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
17 if @+ != ''
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
18 normal! "+gP
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
19 endif
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
20 let c = col(".")
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
21 normal! i
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
22 if col(".") < c " compensate for i<ESC> moving the cursor left
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
23 normal! l
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
24 endif
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
25 let &ve = ove
fe57e4f0eac1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
26 endfunc