fix IndexError when min_num_of_chars is set to 0

Fixes #307. Error is thrown when g:ycm_min_num_of_chars_for_completion
option is set to 0 user tries to delete an identifier which starts at
the beginning of the line.
This commit is contained in:
Stanislav Golovanov 2013-05-09 19:58:44 +04:00
parent 06b1daf1b3
commit e5c99428f3

View File

@ -63,8 +63,8 @@ class FilenameCompleter( ThreadedCompleter ):
def ShouldUseNowInner( self, start_column ):
return ( vim.current.line[ start_column - 1 ] == '/' or
self.AtIncludeStatementStart( start_column ) )
return ( start_column and ( vim.current.line[ start_column - 1 ] == '/' or
self.AtIncludeStatementStart( start_column ) ) )
def SupportedFiletypes( self ):