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:
parent
06b1daf1b3
commit
e5c99428f3
@ -63,8 +63,8 @@ class FilenameCompleter( ThreadedCompleter ):
|
|||||||
|
|
||||||
|
|
||||||
def ShouldUseNowInner( self, start_column ):
|
def ShouldUseNowInner( self, start_column ):
|
||||||
return ( vim.current.line[ start_column - 1 ] == '/' or
|
return ( start_column and ( vim.current.line[ start_column - 1 ] == '/' or
|
||||||
self.AtIncludeStatementStart( start_column ) )
|
self.AtIncludeStatementStart( start_column ) ) )
|
||||||
|
|
||||||
|
|
||||||
def SupportedFiletypes( self ):
|
def SupportedFiletypes( self ):
|
||||||
|
Loading…
Reference in New Issue
Block a user