Skip to content

Commit

Permalink
fix s:WillComplete line prefix logic
Browse files Browse the repository at this point in the history
fix case where user hits <tab> at the start of the line with trailing
characters (the line slice would wrap to the end of the line resulting
in a non empty prefix).

thanks to @char101 for catching this.
  • Loading branch information
ervandew committed Jun 15, 2012
1 parent 22e4269 commit ee35ab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/supertab.vim
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ function! s:WillComplete()
let cnum = col('.')

" honor SuperTabNoCompleteAfter
let pre = line[:cnum - 2]
let pre = cnum >= 2 ? line[:cnum - 2] : ''
for pattern in b:SuperTabNoCompleteAfter
if pre =~ pattern . '$'
return 0
Expand Down

0 comments on commit ee35ab6

Please sign in to comment.