Fork me on GitHub
#emacs
<
2019-10-09
>
bozhidar11:10:38

I think that’s an Emacs built-in and I’m not sure if it can be disabled.

theeternalpulse18:10:44

I've noticed when I'm using magit/evil, when I move the cursor down to "unstaged" in the status buffer I get long pauses, especialy for annoyingly long diffs like a package-lock.json file. The diff is automatically expanded when I go to the magit status buffer, and even before opening the file, if I move the cursor down to "unstaged" it just pauses for a long time

Suvrat Apte06:10:57

magit-section-forward is the function that gets called on pressing n (i.e. cursor down in magit). If you want to find out which function is called on a particular key press, you can press: C-h k and then press the key/keys you want to know about.

Suvrat Apte06:10:46

If you want to see what magit-section-forward is doing, you can put a debugger on it by pressing C-u C-M-x on that function. After that, when you press n in magit status buffer, you will be able to step through in magit-section-forward.

theeternalpulse18:10:55

C-h k with evil only shows evil-next-visual-line

theeternalpulse18:10:11

so I'm guessing magit-section-forward is attached via advice or some other hook

Suvrat Apte10:10:17

Maybe. I’m not very familiar with evil. I use normal Emacs.

theeternalpulse17:10:55

yeah, evil has plugins for other special modes to allow evil motion keys across the board, so not sure how it re-routes the movement keys to the evil commands, or where to even find them

theeternalpulse18:10:04

How can I find out what magit is even doing when the cursor hits the unstaged changes