Don't double set temp options on blame buffer
This commit is contained in:
parent
4a42d4e21c
commit
6db7120c9a
@ -4635,6 +4635,8 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args)
|
||||
let edit = s:Mods(a:mods) . get(['edit', 'split', 'pedit'], a:count - (a:line1 ? a:line1 : 1), 'split')
|
||||
return s:BlameCommit(edit, get(readfile(temp), 0, ''), bufnr(''))
|
||||
else
|
||||
let temp = s:Resolve(temp)
|
||||
let s:temp_files[s:cpath(temp)] = {'dir': s:Dir(), 'filetype': 'fugitiveblame', 'args': cmd}
|
||||
for winnr in range(winnr('$'),1,-1)
|
||||
call setwinvar(winnr, '&scrollbind', 0)
|
||||
if exists('+cursorbind')
|
||||
@ -4645,6 +4647,7 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args)
|
||||
endif
|
||||
endfor
|
||||
let bufnr = bufnr('')
|
||||
let s:temp_files[s:cpath(temp)].bufnr = bufnr
|
||||
let restore = 'call setwinvar(bufwinnr('.bufnr.'),"&scrollbind",0)'
|
||||
if exists('+cursorbind')
|
||||
let restore .= '|call setwinvar(bufwinnr('.bufnr.'),"&cursorbind",0)'
|
||||
@ -4661,8 +4664,6 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args)
|
||||
endif
|
||||
let top = line('w0') + &scrolloff
|
||||
let current = line('.')
|
||||
let temp = s:Resolve(temp)
|
||||
let s:temp_files[s:cpath(temp)] = { 'dir': s:Dir(), 'filetype': 'fugitiveblame', 'args': cmd, 'bufnr': bufnr }
|
||||
exe 'keepalt' (a:bang ? 'split' : 'leftabove vsplit') s:fnameescape(temp)
|
||||
let b:fugitive_blamed_bufnr = bufnr
|
||||
let b:fugitive_type = 'blame'
|
||||
@ -4674,7 +4675,7 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args)
|
||||
if exists('+cursorbind')
|
||||
setlocal cursorbind
|
||||
endif
|
||||
setlocal nomodified nomodifiable nonumber scrollbind nowrap foldcolumn=0 nofoldenable winfixwidth filetype=fugitiveblame buftype=nowrite
|
||||
setlocal nonumber scrollbind nowrap foldcolumn=0 nofoldenable winfixwidth
|
||||
if exists('+concealcursor')
|
||||
setlocal concealcursor=nc conceallevel=2
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user