Skip to content

Commit

Permalink
remove unnecessary context checking which prevents scrolling if conte…
Browse files Browse the repository at this point in the history
…xt default is not <c-n> or <c-p>

fixes #19
  • Loading branch information
ervandew committed May 30, 2011
1 parent 344016d commit 1e3cc50
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions plugin/supertab.vim
Original file line number Diff line number Diff line change
Expand Up @@ -367,19 +367,9 @@ function! s:SuperTab(command)
\ b:complTypeContext == "\<c-n>"))
return "\<c-p>"

" this used to handle call from captured keys with the longest enhancement
" enabled, but also must work when the enhancement is disabled.
" already in completion mode and not resetting for longest enhancement, so
" just scroll to next/previous
elseif pumvisible() && !b:complReset
if b:complType == 'context'
exec "let contextDefault = \"" .
\ escape(g:SuperTabContextDefaultCompletionType, '<') . "\""
" if we are in another completion mode, just scroll to the next
" completion
if b:complTypeContext != contextDefault
return a:command == 'n' ? "\<c-n>" : "\<c-p>"
endif
return contextDefault
endif
if a:command == 'n'
return b:complType == "\<c-p>" ? "\<c-p>" : "\<c-n>"
endif
Expand Down

0 comments on commit 1e3cc50

Please sign in to comment.