aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/git-blamer
diff options
context:
space:
mode:
authorTeddy Wing2018-03-24 04:41:53 +0100
committerTeddy Wing2018-03-24 04:41:53 +0100
commitf8efc45d741883eb1566b9973fe1a24a79061b97 (patch)
tree68772496063b522a40646f40257cd86b701106ba /bundle/git-blamer
parentee5760b0cd08ebe8dce08b230581cedccb7ce4ef (diff)
downloaddotvim-f8efc45d741883eb1566b9973fe1a24a79061b97.tar.bz2
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.
Diffstat (limited to 'bundle/git-blamer')
-rw-r--r--bundle/git-blamer/autoload/git_blamer.vim1
1 files changed, 1 insertions, 0 deletions
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)'