From f8efc45d741883eb1566b9973fe1a24a79061b97 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 24 Mar 2018 04:41:53 +0100 Subject: git-blamer: Fix bug when `nowrap` If `nowrap` is set, the plugin causes an error because it tries to concatenate the `restore` variable which hasn't been defined. Define the variable outside the `if &l:wrap` condition to ensure it's available for concatenation. --- bundle/git-blamer/autoload/git_blamer.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'bundle/git-blamer/autoload') diff --git a/bundle/git-blamer/autoload/git_blamer.vim b/bundle/git-blamer/autoload/git_blamer.vim index 7f90adf..dc41bca 100644 --- a/bundle/git-blamer/autoload/git_blamer.vim +++ b/bundle/git-blamer/autoload/git_blamer.vim @@ -7,6 +7,7 @@ function! git_blamer#Blame() let l:line_number = line('.') let l:buffer_name = shellescape(bufname('%')) let l:buffer_number = bufnr('%') + let restore = '' if &l:wrap let restore = '| call setbufvar(' . l:buffer_number . ', "&wrap", 1)' -- cgit v1.2.3