diff kitten: Do not highlight extremely large files
python's asyncio module has no way to tell a process executor object to kill its worker processes, so highlighting very large files cause the kitten to hang around o exit till the highlighting is done
This commit is contained in:
parent
4189aa8f14
commit
9a1f14d05c
@ -122,6 +122,8 @@ def highlight_line(line):
|
|||||||
def highlight_for_diff(path, aliases):
|
def highlight_for_diff(path, aliases):
|
||||||
ans = []
|
ans = []
|
||||||
lines = lines_for_path(path)
|
lines = lines_for_path(path)
|
||||||
|
if len(lines) > 10000:
|
||||||
|
return ans
|
||||||
hd = highlight_data('\n'.join(lines), path, aliases)
|
hd = highlight_data('\n'.join(lines), path, aliases)
|
||||||
if hd is not None:
|
if hd is not None:
|
||||||
for line in hd.splitlines():
|
for line in hd.splitlines():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user