Just as a confirmation that I have them, and will look through them asap.
I was until yesterday for yet unknown reasons unable to get the list mails
Martin

Mailing lists / lazarus / 2009-05
8 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Just as a confirmation that I have them, and will look through them asap.
I was until yesterday for yet unknown reasons unable to get the list mails
Martin
Makes me wonder, how it integrates, with the ability to configure which mouse button triggers which action
Also the code to do it already exist (Synedit line 6236) for the keyboard shortcut:
Lastly, this can be done already via the context menu too (contextmenu over the foldline)
=> The idea for such a shortcut is good, need to think about if this is done in a good way currently....
-----
with fTextDrawer do
if MarkupInfo = nilwhat if markup onfo is assigned, but doesnt change the bg color? (leaves it to default )
Hm, I ll think about it. I had the idea of somekind of checksum, to allow detection of changed text....
Also, just line-number does not work: There can be 2 or more folds starting the same line, and vie the context menu you can fold any of them.
It mast be optional too (via config) and IMHO not enabled by default.
It is too easy to click by accident, if you try t select a block from position 1 of a line....
Makes me wonder, how it integrates, with the ability to configure which mouse button…
It probably doesn't, but in my application it provides a very simple interface to fold up a long routine, and as I only have one level and one type of fold it does the job.
Also the code to do it already exist (Synedit line 6236) for the keyboard shortcut:
Ahh, nice. I'll look at simplifying my hack then :)
=> The idea for such a shortcut is good, need to think about if this is done in a good way currently....
The way I've done it is less than optimal, but it provides the user interface that I need.
I don't use any kind of markup info, so I've not come across this issue.
Also, just line-number does not work: There can be 2 or more folds starting the same line, and vie the context menu you can fold any of them.
In my application it works fine as I only have one type of fold and they can't be nested :) Always happy to try and extend it in a way that works for everybody though.
Thanks for the feedback :)
Food for thought in any case.
Brad
Brad Campbell wrote
Not really a "gross" hack.
It slightly goes out of the current functionality of a highlighter => which so far is/was a token based highlighter. Line highlighting was reserved for Markup modules.
However this is/was more be evolution as specific design. It is quite reasonable to say that some text-formats/languages want to use full line markup to highlight language features. (Pascal uses Divider-Lines instead). It also does not interfere with any other functionality, and requires very little modifications.
I have integrated this patch in Lazarus (rev 20243).
A few modifications:
Function has been renamed to have "Attribute" in name: GetEndOfLineAttribute The parts in SynEdit have been changed to be more in line with other code, and obey other features too.
Also note, that:
- the part in SynEdit may change in the future, but should continue to obey the attribute returned.
- May in future obey underline or Frame color or new features. It is therefore important to set those correctly (clNone)
Best Regards
Martin
Thanks Martin, that's one more patch I can drop from my tree :)
Regards,
Brad
Just as a confirmation that I have them, and will look through them asap. I was until…
Just to let you know, do not worry about redoing your patch. I am working on related items, and will include a solution.
Martin
You should now be able to configure your synedit in the desired manner.
In order to be able to click the "line" below a "[-]" sign add the following config
Menu=>environments=>options=>editor=>mouse
Select "FoldTree" (the first entry in gutter) => this will catch any click anywhere in the fold part of the gutter; so if you do not want the click to act or act the same way on [+] / [-] symbols, then override the config in the sub-nodes.
- Add an entry to catch the desired click (left, single or any, down)
- Command Fold
- Mode: Current node (The minimum enclosing node)
if desired decide to move the caret