Fix visual mode exclusion for staging on section header

This commit is contained in:
Tim Pope
2019-09-22 21:25:15 -04:00
parent 37088aaf65
commit edd054f76f

View File

@@ -2583,7 +2583,7 @@ endfunction
function! s:Do(action, visual) abort
let line = getline('.')
let reload = 0
if !a:0 && !v:count && line =~# '^[A-Z][a-z]'
if !a:visual && !v:count && line =~# '^[A-Z][a-z]'
let header = matchstr(line, '^\S\+\ze:')
if len(header) && exists('*s:Do' . a:action . header . 'Header')
let reload = s:Do{a:action}{header}Header(matchstr(line, ': \zs.*')) > 0