Default b:max_textwidth to -1

Fixes #4

In general, I think it's good hygiene for a function to do this if it's
value is expected to be set elsewhere.
This commit is contained in:
Matthew Lyon
2014-01-28 12:28:46 -02:00
parent 2beb882336
commit db68526de4

View File

@@ -70,6 +70,9 @@ function! pencil#init(...) abort
if !exists('b:wrap_mode') if !exists('b:wrap_mode')
let b:wrap_mode = s:WRAP_MODE_OFF let b:wrap_mode = s:WRAP_MODE_OFF
endif endif
if !exists("b:max_textwidth")
let b:max_textwidth = -1
endif
" If user explicitly requested wrap_mode thru args, go with that. " If user explicitly requested wrap_mode thru args, go with that.
let l:wrap_arg = get(l:args, 'wrap', 'detect') let l:wrap_arg = get(l:args, 'wrap', 'detect')