mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 09:52:13 +03:00
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):
|
||||
ans = []
|
||||
lines = lines_for_path(path)
|
||||
if len(lines) > 10000:
|
||||
return ans
|
||||
hd = highlight_data('\n'.join(lines), path, aliases)
|
||||
if hd is not None:
|
||||
for line in hd.splitlines():
|
||||
|
Loading…
Reference in New Issue
Block a user