.vimrc: Set mouse only if mouse support is available
authorOleg Broytman <phd@phdru.name>
Mon, 6 May 2019 14:51:25 +0000 (17:51 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 6 May 2019 14:51:25 +0000 (17:51 +0300)
.vimrc

diff --git a/.vimrc b/.vimrc
index 1818125..bcc859b 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -87,7 +87,9 @@ set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)\ -\ [%{$USER}@%{h
 
 " 9 using the mouse
 
-set mouse=ar      " Use mouse in all modes, plus hit-return
+if has('mouse')
+   set mouse=ar      " Use mouse in all modes, plus hit-return
+endif
 
 " 12 messages and info