tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
19.82k stars 1k forks source link

confusing section folding toggle behavior #2297

Open bart9h opened 4 months ago

bart9h commented 4 months ago

In the status screen (the one you arrive with :G) you can open and close the diff for each file with =. You can also open and close the diffs for all files of a section at once by hitting = in the section header, right?

Not quite. Pressing = in the section header actually toggles the diff display for each file. If I have files A, B, C, D and E; individually open the diff for B, C and E; and then decide to close all diffs, by pressing = on the section header, it actually closes the diff for B, C and E but opens the diff for A and D.

The behavior I would expect is: if there is any diff opened, then close all; else, open all.

PS: thanks a lot for this wonderful plugin, it's a must-have to me