#503 Greedy IF/ELSE IF folding.

Feature_Request
open-later
Neil Hodgson
Scintilla (789)
2
2006-11-29
2006-11-28
Anonymous
No

Tested on sc171.exe (without any user or other settings active)
~ fold.at.else: not effecting this case.
~ lexers effected: C/C++,C#,Cpp, CSS, Java, Javascript, Perl, Shell, TLC.
(Not effected: Matlab, Python, VB, VBScript, YAML)
(Cannibals: Ruby, SQL)
- - ->8
if (*) { 1
;
} else if (* "will be folded inside IF fold"
*) { 2
;
} else if (* "this line will be folded inside ELSE IF fold"
*) { 3
;
} else { 4
;
}
- - ->8

If I get around it, I Will try some appropriate copy and pasting.
(playing with Bat right now)

... mmm,
Anyone got, or knows about(link), a external-lexer-DLL make-file for WingGW/Win32 that I can use.

Discussion

  • Neil Hodgson
    Neil Hodgson
    2006-11-29

    Logged In: YES
    user_id=12579
    Originator: NO

    The line level is normally (without fold.at.else) measured at the start of line in order to hide the '}' line when it is a simple

    if () {
    x;
    }

    You can see the fold level information (for debugging) by setting

    fold.flags=64
    line.margin.width=12

     
  • Neil Hodgson
    Neil Hodgson
    2006-11-29

    • labels: --> Scintilla
    • milestone: --> Feature_Request
    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-later