I attach another patch to fix the minor bug about when folding a section, the name of the next section was folded too:
---------------------------------
[section1]
key1=value1
[section2]
key2=value2
---------------------------------
When folding section1, it became like that:
---------------------------------