aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-07 22:14:33 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-07 22:14:33 +1200
commitbe356a92e16faea7dc88d65e382b9ab893a619f1 (patch)
tree8aec794c2c6a83c7a9e9c3956de25afb6711643f
parentAdd missing parens to func calls (diff)
downloadvim-copy-linebreak-be356a92e16faea7dc88d65e382b9ab893a619f1.tar.gz
vim-copy-linebreak-be356a92e16faea7dc88d65e382b9ab893a619f1.zip
Check for existence of s:showbreak_save var first
-rw-r--r--plugin/copy_linebreak.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/copy_linebreak.vim b/plugin/copy_linebreak.vim
index 80ef96c..8ee6c05 100644
--- a/plugin/copy_linebreak.vim
+++ b/plugin/copy_linebreak.vim
@@ -27,8 +27,10 @@ endfunction
" Disable copy-friendly linebreak options
function! s:CopyLinebreakDisable()
setlocal linebreak linebreak?
- let &showbreak = s:showbreak_save
- unlet s:showbreak_save
+ if exists('s:showbreak_save')
+ let &showbreak = s:showbreak_save
+ unlet s:showbreak_save
+ endif
if exists('+breakindent')
setlocal breakindent<
endif