#668 Long wrapped are not folded correctly

Feature_Request
open-rejected
Scintilla (793)
2
2008-03-31
2008-03-31
No

When wrapped lines are used and a long line is wrapped, it doesn't get correctly folded.

Attached is an example C file.
Enable line wrapping and fold line 5, you will see the wrapped line is still visible.
Of course, folding itself works correctly and it might not really a bug. But IMO the wrapped line should be folded and only the first part of the line should be visible (until it is wrapped for the first time).
Maybe the C example isn't a good example as generally people wouldn't write such code but see the original bug report(link below) for a real example when it happens.

Verified with Scite 1.76 and Geany using Scintilla 1.76.

For reference, the original bug report was here:
https://sourceforge.net/tracker/?func=detail&atid=787791&aid=1918636&group_id=153444

Discussion

  • Enrico Tröger

    Enrico Tröger - 2008-03-31

    Folding bug with wrapped lines

     
  • Neil Hodgson

    Neil Hodgson - 2008-03-31
    • milestone: 100660 --> Feature_Request
    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-rejected
     
  • Neil Hodgson

    Neil Hodgson - 2008-03-31

    Logged In: YES
    user_id=12579
    Originator: NO

    This is working as intended. Folding is for showing the logical structure of the lines of a document and occurs on a document line basis. Say the header line was something like "class DocumentViewHandler" and the body of the class was folded away. You wouldn't want that to hide the name of the class which is how you work out what to unfold. This is the same behaviour as other editors with folding such as Visual Studio.

     
  • Enrico Tröger

    Enrico Tröger - 2008-04-02

    Logged In: YES
    user_id=1117045
    Originator: YES

    You are right, I didn't mean to hide the header line(class in your example). But if that line is wrapped multiple times, it would be better if only the first part of the line is shown, i.e. the wrapped parts are folded away.
    See the docbook example file in the mentioned Geany bugreport. Maybe my C example file wasn't really good as a testcase.

    While thinking about, this is more a feature request than a bug report because as you told, it's working as intended but could be improved for wrapped lines, IMO.

     
  • Neil Hodgson

    Neil Hodgson - 2008-04-04

    Logged In: YES
    user_id=12579
    Originator: NO

    Where do you want to stop drawing? For C++, a method definition may be "const IFileView *ViewBase::GetDocumentView(Event *pevent, ...) and may wrap on up to 4 lines. Dropping the 2nd, 3rd or 4th line may hide the information I want to see.

    Possibly the original reporter wanted stream folding which could fold the contents of an element such as the text between a <para> and </para> tag. Scintilla doesn't do stream folding because it looks too difficult.

     
  • Enrico Tröger

    Enrico Tröger - 2008-04-07

    Logged In: YES
    user_id=1117045
    Originator: YES

    I've no idea what would the best way to fold wrapped lines. Ideally, the folding of wrapped lines would be context-sensitive in some way, this probably is similar to stream folding and probably both is too difficult to implement.
    Or, instead of any context-sensitive/stream folding, Scintilla could visually indicate that a wrapped line is folded. Only the first part of the whole is shown, the rest is folded away. And to indicate there are parts of the lines hidden, Scintilla could display a special symbol at the end of the fold point or something in this way.

    Just an idea.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks