Skip to content

Commit

Permalink
on s:InitBuffer, don't set buffer local default completion type if al…
Browse files Browse the repository at this point in the history
…ready set

fixes case where SuperTabSetDefaultCompletionType() is called before
s:InitBuffer by a user autocmd or ftplugin.
  • Loading branch information
ervandew committed Dec 23, 2011
1 parent 688b5d7 commit ac395b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/supertab.vim
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ function! s:InitBuffer()
let b:SuperTabNoCompleteAfter = g:SuperTabNoCompleteAfter
endif

let b:SuperTabDefaultCompletionType = g:SuperTabDefaultCompletionType
if !exists('b:SuperTabDefaultCompletionType')
let b:SuperTabDefaultCompletionType = g:SuperTabDefaultCompletionType
endif

" set the current completion type to the default
call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
Expand Down

0 comments on commit ac395b5

Please sign in to comment.