summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-02-09 20:22:30 +0100
committerBram Moolenaar <Bram@vim.org>2017-02-09 20:22:30 +0100
commit8cc2a9c062fa38e133a62778518f769a423a2526 (patch)
tree3adfd9c063f9b46cbdb7f67be4c1dc9da90b065a
parent4d8505155ec3d0f04e268b2997153ecaf37ee188 (diff)
downloadvim-8cc2a9c062fa38e133a62778518f769a423a2526.zip
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)
-rw-r--r--runtime/macros/matchit.vim4
-rw-r--r--runtime/mswin.vim44
-rw-r--r--src/version.c2
3 files changed, 35 insertions, 15 deletions
diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim
index 9cfe2e532..f6f463f40 100644
--- a/runtime/macros/matchit.vim
+++ b/runtime/macros/matchit.vim
@@ -1,3 +1,5 @@
" Load the matchit package.
" For those users who were loading the matchit plugin from here.
-packadd matchit
+if 1
+ packadd matchit
+endif
diff --git a/runtime/mswin.vim b/runtime/mswin.vim
index ca280d227..6dff7e771 100644
--- a/runtime/mswin.vim
+++ b/runtime/mswin.vim
@@ -1,7 +1,7 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2012 Jul 25
+" Last change: 2017 Feb 09
" bail out if this isn't wanted (mrsvim.vim uses this).
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
@@ -23,20 +23,22 @@ set backspace=indent,eol,start whichwrap+=<,>,[,]
" backspace in Visual mode deletes selection
vnoremap <BS> d
-" CTRL-X and SHIFT-Del are Cut
-vnoremap <C-X> "+x
-vnoremap <S-Del> "+x
+if has("clipboard")
+ " CTRL-X and SHIFT-Del are Cut
+ vnoremap <C-X> "+x
+ vnoremap <S-Del> "+x
-" CTRL-C and CTRL-Insert are Copy
-vnoremap <C-C> "+y
-vnoremap <C-Insert> "+y
+ " CTRL-C and CTRL-Insert are Copy
+ vnoremap <C-C> "+y
+ vnoremap <C-Insert> "+y
-" CTRL-V and SHIFT-Insert are Paste
-map <C-V> "+gP
-map <S-Insert> "+gP
+ " CTRL-V and SHIFT-Insert are Paste
+ map <C-V> "+gP
+ map <S-Insert> "+gP
-cmap <C-V> <C-R>+
-cmap <S-Insert> <C-R>+
+ cmap <C-V> <C-R>+
+ cmap <S-Insert> <C-R>+
+endif
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
@@ -44,8 +46,10 @@ cmap <S-Insert> <C-R>+
" Uses the paste.vim autoload script.
" Use CTRL-G u to have CTRL-Z only undo the paste.
-exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
-exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
+if 1
+ exe 'inoremap <script> <C-V> <C-G>u' . paste#paste_cmd['i']
+ exe 'vnoremap <script> <C-V> ' . paste#paste_cmd['v']
+endif
imap <S-Insert> <C-V>
vmap <S-Insert> <C-V>
@@ -99,6 +103,18 @@ inoremap <C-F4> <C-O><C-W>c
cnoremap <C-F4> <C-C><C-W>c
onoremap <C-F4> <C-C><C-W>c
+if has("gui")
+ " CTRL-F is the search dialog
+ noremap <C-F> :promptfind<CR>
+ inoremap <C-F> <C-\><C-O>:promptfind<CR>
+ cnoremap <C-F> <C-\><C-C>:promptfind<CR>
+
+ " CTRL-H is the replace dialog
+ noremap <C-H> :promptrepl<CR>
+ inoremap <C-H> <C-\><C-O>:promptrepl<CR>
+ cnoremap <C-H> <C-\><C-C>:promptrepl<CR>
+endif
+
" restore 'cpoptions'
set cpo&
if 1
diff --git a/src/version.c b/src/version.c
index 2d6940d94..7a3d21513 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 321,
+/**/
320,
/**/
319,