tpope / vim-fugitive

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

confusing section folding toggle behavior #2297

Open bart9h opened 6 months ago

bart9h commented 6 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