Skip to content

Commit 8cc2a9c

Browse files
committed
patch 8.0.0321: errors when trying to use scripts in tiny version
Problem: When using the tiny version trying to load the matchit plugin gives an error. On MS-Windows some default mappings fail. Solution: Add a check if the command used is available. (Christian Brabandt)
1 parent 4d85051 commit 8cc2a9c

File tree

3 files changed

+35
-15
lines changed

3 files changed

+35
-15
lines changed

runtime/macros/matchit.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
" Load the matchit package.
22
" For those users who were loading the matchit plugin from here.
3-
packadd matchit
3+
if 1
4+
packadd matchit
5+
endif

runtime/mswin.vim

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Set options and add mapping such that Vim behaves a lot like MS-Windows
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last change: 2012 Jul 25
4+
" Last change: 2017 Feb 09
55

66
" bail out if this isn't wanted (mrsvim.vim uses this).
77
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
@@ -23,29 +23,33 @@ set backspace=indent,eol,start whichwrap+=<,>,[,]
2323
" backspace in Visual mode deletes selection
2424
vnoremap <BS> d
2525
26-
" CTRL-X and SHIFT-Del are Cut
27-
vnoremap <C-X> "+x
28-
vnoremap <S-Del> "+x
26+
if has("clipboard")
27+
" CTRL-X and SHIFT-Del are Cut
28+
vnoremap <C-X> "+x
29+
vnoremap <S-Del> "+x
2930
30-
" CTRL-C and CTRL-Insert are Copy
31-
vnoremap <C-C> "+y
32-
vnoremap <C-Insert> "+y
31+
" CTRL-C and CTRL-Insert are Copy
32+
vnoremap <C-C> "+y
33+
vnoremap <C-Insert> "+y
3334
34-
" CTRL-V and SHIFT-Insert are Paste
35-
map <C-V> "+gP
36-
map <S-Insert> "+gP
35+
" CTRL-V and SHIFT-Insert are Paste
36+
map <C-V> "+gP
37+
map <S-Insert> "+gP
3738
38-
cmap <C-V> <C-R>+
39-
cmap <S-Insert> <C-R>+
39+
cmap <C-V> <C-R>+
40+
cmap <S-Insert> <C-R>+
41+
endif
4042

4143
" Pasting blockwise and linewise selections is not possible in Insert and
4244
" Visual mode without the +virtualedit feature. They are pasted as if they
4345
" were characterwise instead.
4446
" Uses the paste.vim autoload script.
4547
" Use CTRL-G u to have CTRL-Z only undo the paste.
4648

47-
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
48-
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
49+
if 1
50+
exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
51+
exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
52+
endif
4953

5054
imap <S-Insert> <C-V>
5155
vmap <S-Insert> <C-V>
@@ -99,6 +103,18 @@ inoremap <C-F4> <C-O><C-W>c
99103
cnoremap <C-F4> <C-C><C-W>c
100104
onoremap <C-F4> <C-C><C-W>c
101105
106+
if has("gui")
107+
" CTRL-F is the search dialog
108+
noremap <C-F> :promptfind<CR>
109+
inoremap <C-F> <C-\><C-O>:promptfind<CR>
110+
cnoremap <C-F> <C-\><C-C>:promptfind<CR>
111+
112+
" CTRL-H is the replace dialog
113+
noremap <C-H> :promptrepl<CR>
114+
inoremap <C-H> <C-\><C-O>:promptrepl<CR>
115+
cnoremap <C-H> <C-\><C-C>:promptrepl<CR>
116+
endif
117+
102118
" restore 'cpoptions'
103119
set cpo&
104120
if 1

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
321,
767769
/**/
768770
320,
769771
/**/

0 commit comments

Comments
 (0)