Always use cursorline with a highlight.
[profile.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 426e394..29b0b6d 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -212,7 +212,6 @@ fun! Iain_Vars() "{{{2
   call Prep_Var("b:iainstatus", "'Fih'")
   call Prep_Var("g:iainextracolumnsnumber", "''")
   call Prep_Var("g:iainextracolumnslist", "''")
-  call Prep_Var("b:iaincul", 0)
   call Prep_Var("b:iainalt", 0)
   if has("signs")
     call Prep_Var("g:marksigns", 0)
@@ -1184,22 +1183,6 @@ fun! Show_GUITabLine() "{{{2
   return l:s
 endfun "}}}2
 
-" Toggle highlighting cursor line when focus changes.
-fun! <SID>ToggleCursorLine() "{{{2
-  call Iain_Vars()
-
-  if b:iainstatus =~# "H" && b:iainstatus =~# "I"
-    " We are held in insert mode.
-    if b:iainstatus =~# "f"
-      " And focus was lost.
-      let b:iaincul = getbufvar("", "&cursorline")
-      setlocal cursorline
-    elseif ! b:iaincul
-      setlocal nocursorline
-    endif
-  endif
-endfun "}}}2
-
 " Handle searching in a BufExplorer window.
 fun! <SID>BufExplorer_Search(n) "{{{2
   if a:n == 0
@@ -1251,10 +1234,6 @@ if has("autocmd")
   au StatusLine InsertEnter * call Highlight_StatusLine("I")
   au StatusLine InsertLeave * call Highlight_StatusLine("i")
 
-  if has("syntax")
-    au Display FocusGained,FocusLost * call <SID>ToggleCursorLine()
-  endif
-
   if has("signs")
     au Signs CursorHoldI * call <SID>Highlight_Signs()
     au Signs InsertEnter * call <SID>Highlight_Signs()
@@ -1452,6 +1431,18 @@ if has("autocmd")
 endif
 
 endif "}}}1
+"
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Handle options only available in Vim 7.4 and above.
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+if version >= "704" "{{{1
+version 7.4
+
+if has("syntax")
+  se cursorline
+endif
+
+endif "}}}1
 
 " Resize after startup.
 if version >= "500" "{{{1