2 Commits

Author SHA1 Message Date
KSR-Yasuda
3aded68f08 Merge 4767a6caa8 into d74a7cff4c 2025-01-24 11:30:46 +01:00
yasuda
4767a6caa8 Allow ++curwin option to come later 2024-08-07 14:47:50 +09:00

View File

@@ -3791,14 +3791,17 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg, ...) abort
exe s:DirCheck(dir)
endif
let config = copy(fugitive#Config(dir))
let curwin = a:arg =~# '^++curwin\>' || !a:line2
let [args, after] = s:SplitExpandChain(substitute(a:arg, '^++curwin\>\s*', '', ''), s:Tree(dir))
let curwin = !a:line2
let [args, after] = s:SplitExpandChain(a:arg, s:Tree(dir))
let flags = []
let pager = -1
let explicit_pathspec_option = 0
let did_expand_alias = 0
while len(args)
if args[0] ==# '-c' && len(args) > 1
if args[0] ==# '++curwin'
let curwin = curwin || v:true
call remove(args, 0)
elseif args[0] ==# '-c' && len(args) > 1
call extend(flags, remove(args, 0, 1))
elseif args[0] =~# '^-p$\|^--paginate$'
let pager = 2