summaryrefslogtreecommitdiffstats
path: root/runtime/defaults.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-27 18:50:25 +0100
committerBram Moolenaar <Bram@vim.org>2019-10-27 18:50:25 +0100
commit5b418992cf254137fde2a14d7066fbea5afddb28 (patch)
treed37edd3caa682bfa285dbdf6dff97e8ac7b6edd5 /runtime/defaults.vim
parent52410575be50d5c40bbe6380159df48cfc382ceb (diff)
patch 8.1.2226: cannot use system copy/paste in non-xterm terminalsv8.1.2226
Problem: Cannot use system copy/paste in non-xterm terminals. Solution: Instead of setting 'mouse' to "a" set it to "nvi" in defaults.vim.
Diffstat (limited to 'runtime/defaults.vim')
-rw-r--r--runtime/defaults.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/defaults.vim b/runtime/defaults.vim
index 255b67b470..e7929eacd4 100644
--- a/runtime/defaults.vim
+++ b/runtime/defaults.vim
@@ -75,8 +75,14 @@ inoremap <C-U> <C-G>u<C-U>
" In many terminal emulators the mouse works just fine. By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
+" Only xterm can grab the mouse events when using the shift key, for other
+" terminals use ":", select text and press Esc.
if has('mouse')
- set mouse=a
+ if &term =~ 'xterm'
+ set mouse=a
+ else
+ set mouse=nvi
+ endif
endif
" Switch syntax highlighting on when the terminal has colors or when using the