vim: indent_finder analyse first 1024lines only
This commit is contained in:
parent
12b51ebff3
commit
e623aa6e12
@ -49,6 +49,7 @@ VERBOSE_DEBUG = 2
|
|||||||
VERBOSE_DEEP_DEBUG = 3
|
VERBOSE_DEEP_DEBUG = 3
|
||||||
|
|
||||||
DEFAULT_VERBOSITY = VERBOSE_QUIET
|
DEFAULT_VERBOSITY = VERBOSE_QUIET
|
||||||
|
MAX_LINE = 1024
|
||||||
|
|
||||||
###
|
###
|
||||||
class LineType:
|
class LineType:
|
||||||
@ -129,9 +130,13 @@ class IndentFinder:
|
|||||||
def parse_file( self, fname ):
|
def parse_file( self, fname ):
|
||||||
f = open( fname )
|
f = open( fname )
|
||||||
l = f.readline()
|
l = f.readline()
|
||||||
|
i = 0
|
||||||
while( l ):
|
while( l ):
|
||||||
self.analyse_line( l )
|
self.analyse_line( l )
|
||||||
l = f.readline()
|
l = f.readline()
|
||||||
|
if i > MAX_LINE:
|
||||||
|
break
|
||||||
|
i+=1
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
def clear( self ):
|
def clear( self ):
|
||||||
|
Loading…
Reference in New Issue
Block a user