Menu

#638 Reduce folding line width to less than long line marker.

Initial
open
3
2022-04-09
2009-12-20
No

Geany uses Scintilla to create a horizontal black line representing the folded code. There is also in addition a horizontal light green line representing the long line marker. This long line marker is very nice, as it automatically triggers your consciousness if something is at the right side of it, and therefore is (possibly) too long. However, if I fold some part of the code, the black line, representing the folded code, is present from left to right, regardless the line length. This black line triggers my attention too, as if something is wrong, but actually it isn't.

So, my request would be to reduce the folding black line in Scintilla to less than the actual long line settings, with an aesthetically preference to gray out or dot out, as shown in the example (for Geany, but it certainly applies to SciTE too).

(see also original request at Geany project)
https://sourceforge.net/tracker/?func=detail&atid=787794&aid=2913749&group_id=153444

Regards,

Peter Scholtens

Related

Feature Requests: #1419

Discussion

  • Peter Scholtens

    Peter Scholtens - 2009-12-20

    Original Screen Geany (rev4492)

     
  • Peter Scholtens

    Peter Scholtens - 2009-12-20

    Edited Screen, with dotted fading out of horizontal folding line.

     
  • Neil Hodgson

    Neil Hodgson - 2009-12-22

    You can turn the black line off with SCI_SETFOLDFLAGS. The colour of the line may be altered by changing the foreground colour of STYLE_DEFAULT although this will also alter the colour of other features.

    I'll accept a patch that implements an option to draw fold lines using the dotted grey appearance of indentation guides or that allows independently setting the colour of fold lines.

    The purpose of the edge (green vertical line) is to allow people to easily follow coding conventions that require all lines to be less that a particular number of characters, commonly 80 or 72. I don't really see any relationship between the fold line and the edge so fading out at the edge doesn't seem reasonable to me. The examples even show text extending well beyond the edge so it looks like it is serving no purpose here.

     
  • Neil Hodgson

    Neil Hodgson - 2009-12-22
    • labels: --> Scintilla
    • priority: 5 --> 3
    • assigned_to: nobody --> nyamatongwe
     
  • Peter Scholtens

    Peter Scholtens - 2009-12-26

    Patch to reduce fold line

     
  • Peter Scholtens

    Peter Scholtens - 2009-12-26

    The actual request was not to the change the colors of the lines, but to make it clear to the user, in a split second, if there is anything beyond the edgeline.

    The submitted examples indeed contains comments which exceeds the actual edgeline (so I should have submitted a screenshot without to explain it better), but the idea is as following: having the code fully unfolded, the user can move the text around until all fits left of the edgeline. This leaves a completely blank space right of the edgeline, which is even verified in a split second. However, having the code folded, the folding lines are suddenly present right, and the completely blank space is broken. It takes more time of the user (okay, parts of second, but still) to verify if no code/text is beyond this edgeline.

    As you suggested I wrote a patch, including a new function DrawFoldLine(), which implements three options, using the last variable FoldLine Style as selection method:
    If it has value '0', the default full width fold line is present.
    If it a positive number, this is the size of the fold line, expressed in columns.
    If it is a negative number, it defines the space between the foldline and the edgeline.

    Having no opinion/overview how to pass this variable from the user(s) to the actual drawing procedure, I hope the main developer can implement this. To demonstrate the effect, I've set the reduced foldline to my personal preference value, "-1".

    Regards,
    Peter Scholtens

     
  • Vic

    Vic - 2021-10-12

    Having the end of the fold line at the vertical guide line (or at a fixed offset before that) would only give a false sense of security regarding whether the hidden lines exceed or not the vertical guide line.
    What the author should have wished for is that the end position of the fold line be set at end of longest of the hidden lines .
    (Which would kind of agree with the idea that the fold line represents the hidden lines.)

     

    Last edit: Vic 2021-10-13
  • Zufu Liu

    Zufu Liu - 2022-04-09
    • labels: Scintilla --> Scintilla, folding
    • Group: --> Initial
     

Log in to post a comment.

MongoDB Logo MongoDB