vim: indent_finder analyse first 1024lines only

This commit is contained in:
Mathieu Maret 2020-11-16 12:30:29 +01:00
parent 12b51ebff3
commit e623aa6e12
1 changed files with 5 additions and 0 deletions

View File

@ -49,6 +49,7 @@ VERBOSE_DEBUG = 2
VERBOSE_DEEP_DEBUG = 3
DEFAULT_VERBOSITY = VERBOSE_QUIET
MAX_LINE = 1024
###
class LineType:
@ -129,9 +130,13 @@ class IndentFinder:
def parse_file( self, fname ):
f = open( fname )
l = f.readline()
i = 0
while( l ):
self.analyse_line( l )
l = f.readline()
if i > MAX_LINE:
break
i+=1
f.close()
def clear( self ):