[Lazarus] [Fwd: A few hacky patches (resent)]
Martin Friebe
lazarus at mfriebe.de
Fri May 22 02:20:17 CEST 2009
Martin Friebe wrote:
>
>>>
>>> laz-synpatch-005.patch
>>> This is a gross hack, but it allows clicking *anywhere* on the grey
>>> fold line in the gutter to fold
>>> that particular level of routine. I have some procedures that are
>>> very long and it's nice to be able
>>> to click on that line from the bottom of the procedure and have it
>>> fold up on me.
> 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:
>> EcFoldCurrent:
>> begin
>> CY := FFoldedLinesView.ExpandedLineForBlockAtLine(CaretY);
>> if CY > 0 then begin
>> FFoldedLinesView.FoldAtTextIndex(CY-1);
>> SetCaretXY(Point(1, CY));
>> end;
>> end;
>
> 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....
>
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....
More information about the Lazarus
mailing list