magit-delta icon indicating copy to clipboard operation
magit-delta copied to clipboard

Don't apply delta to enormously large buffers

Open jumper047 opened this issue 1 year ago • 3 comments

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

jumper047 avatar Oct 31 '23 20:10 jumper047

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

dandavison avatar Nov 01 '23 14:11 dandavison

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?

dandavison avatar Nov 13 '23 22:11 dandavison

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

daanturo avatar Mar 11 '24 15:03 daanturo