When the whole file is indented, i.e. when there is white-space first on every line of the file, the "Indent" folding mode will create bad foldings.
To reproduce:
1. Create a new "text" file with folding mode "Indent".
2. Enter the following lines in the buffer (first and third line are left-adjusted while second and fourth line are indented):
aaaa
bbbb
cccc
dddd
3. Select Folding > Collapse All Folds. This works fine and you will see the following (where both lines are foldings that can be expanded):
aaaa
cccc
4. Now expand the folds, and indent all lines one more level (e.g. with C+a, tab). The file will then look like this:
aaaa
bbbb
cccc
dddd
5. Select Folding > Collapse All Folds. This is where it bugs out. You will now see only one line:
aaaa
6. Expand the folding and you will see:
aaaa
bbbb
Lines three and four have disappeared. The only way to get them back is with Folding > Expand All Folds (or similar).
jEdit 4.4.1 with Java 1.6.0-23 on Solaris 10. Also with jEdit 4.4.1 with Java 1.6.0-26 on Windows 7. Have not tested other versions.
Ok, so the indentations in my example obviously did not make it into the textual description here. What should I have done to get it right? "nbsp"? I'll try it below:
aaaa
bbbb
cccc
I give up and just hope that you get it from the descriptions...
On mailing list it displays properly.
I noticed people use dots, they are good spaces :)
[i]
To reproduce:
1. Create a new "text" file with folding mode "Indent".
2. Enter the following lines in the buffer (first and third line are left-adjusted while second and fourth line are indented):
aaaa
..bbbb
cccc
..dddd
3. Select Folding > Collapse All Folds. This works fine and you will see the following (where both lines are foldings that can be expanded):
aaaa
cccc
4. Now expand the folds, and indent all lines one more level (e.g. with C+a, tab). The file will then look like this:
..aaaa
....bbbb
..cccc
....dddd
5. Select Folding > Collapse All Folds. This is where it bugs out. You will now see only one line:
..aaaa
6. Expand the folding and you will see:
..aaaa
....bbbb
Lines three and four have disappeared. The only way to get them back is with Folding > Expand All Folds (or similar).
[/i]
Fixed in r20019