mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 04:23:46 -05:00
Fix visual mode exclusion for staging on section header
This commit is contained in:
@@ -2583,7 +2583,7 @@ endfunction
|
|||||||
function! s:Do(action, visual) abort
|
function! s:Do(action, visual) abort
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
let reload = 0
|
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:')
|
let header = matchstr(line, '^\S\+\ze:')
|
||||||
if len(header) && exists('*s:Do' . a:action . header . 'Header')
|
if len(header) && exists('*s:Do' . a:action . header . 'Header')
|
||||||
let reload = s:Do{a:action}{header}Header(matchstr(line, ': \zs.*')) > 0
|
let reload = s:Do{a:action}{header}Header(matchstr(line, ': \zs.*')) > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user