call Prep_Var("b:iainstatus", "'Fih'")
call Prep_Var("g:iainextracolumnsnumber", "''")
call Prep_Var("g:iainextracolumnslist", "''")
+ call Prep_Var("b:iaincul", 0)
if has("signs")
call Prep_Var("g:marksigns", 0)
call Prep_Var("g:firstsign", 100)
return l:s
endfun "}}}2
+" Toggle highlighting cursor line when focus changes.
+fun! <SID>ToggleCursorLine() "{{{2
+ call Iain_Vars()
+
+ if b:iainstatus =~# "f" && b:iainstatus =~# "H" && b:iainstatus =~# "I"
+ " Focus lost while held in insert mode.
+ let b:iaincul = getbufvar("", "&cursorline")
+ setlocal cursorline
+ elseif ! b:iaincul
+ setlocal nocursorline
+ endif
+endfun "}}}2
+
se tabline=%!Show_TabLine()
se guitablabel=%!Show_GUITabLine()
au StatusLine InsertEnter * call Highlight_StatusLine("I")
au StatusLine InsertLeave * call Highlight_StatusLine("i")
+au Display FocusGained,FocusLost * call <SID>ToggleCursorLine()
+
if has("signs")
au Signs InsertEnter * call <SID>Highlight_Signs()
au Signs InsertLeave * call <SID>Highlight_Signs()