motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 6db7120c9a56e09c381137669bbdfd3b205cf9f2 (tree)
parent 4a42d4e21c2f1fffc1b857c7bc5985f504a090be
Author: Tim Pope <code@tpope.net>
Date:   Thu,  8 Aug 2019 19:57:55 -0400

Don't double set temp options on blame buffer

Diffstat:
Mautoload/fugitive.vim | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -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