dandavison / magit-delta

Use delta (https://github.com/dandavison/delta) when viewing diffs in Magit
MIT License
285 stars 10 forks source link

Don't apply delta to enormously large buffers #27

Open jumper047 opened 9 months ago

jumper047 commented 9 months ago

Introduces new variable - magit-delta-max-lines, set to 1000 by default. If buffer lines exceeded this value, then default magit highlighting used instead of delta to keep emacs responsive. Regarding default value - 1000 just works for me:). It tooks 2-3 seconds to display diff on Core-I7, so maybe it should be decreased. This MR fixes #26

dandavison commented 9 months ago

Thanks! I'm running your commit locally. I might be slightly slow to review and merge due to day job.

dandavison commented 8 months ago

If buffer lines exceeded this value, then default magit highlighting used instead of delta

I'm not seeing any color when it disables delta. Do you see the usual magit colors?

daanturo commented 4 months ago

Do you see the usual magit colors?

I still can see Magit's normal red and green colors, for example this commit: https://github.com/dandavison/delta/commit/79979c272d6daa876ffb3dbad7a6550c22155c8c

Screenshot_20240311_223901