View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0036739||Lazarus||IDE||public||2020-02-27 13:26||2020-03-10 09:23|
|Reporter||Fr0sT||Assigned To||Martin Friebe|
|Product Version||2.1 (SVN)|
|Summary||0036739: Improve/fix code folding|
|Description||1) Bug: advanced mouse actions doesn't work. I have default action Unfold code/Ctrl+LMB/All (Nodes) but it only unfolds a node I clicked on. Nested nodes remain folded.|
2) Improvement: add more folding commands. Now there's only "Fold to level #" and "Fold to cursor". I just can't imagine when these "Fold to level #" with # > 1 could be useful. Nesting levels are only make sense in XML or something similar while in source code absolutely different blocks could have the same level. Much more useful would be the folding of logical structures - procedures, regions and so on. "Unfold all nested nodes" would be useful as well.
|Fixed in Revision|
The description of the action may be misleading:
"Unfold all" means unfold all folds, that start on the current line.
if a then begin if b the begin
If both begins are folded, then both will be unfolded.
Otherwise only the outer will be unfolded, and the inner will unfold on a 2nd click.
An "unfold all + nested" does currently not exist. But might be an idea.
It may also be something to be added to the fold-gutter pop up menu.
It is actually documented (but not easy to find) https://wiki.lazarus.freepascal.org/IDE_Window:_EditorMouseOptionsAdvanced#Unfold_Commands
||Hmmm... Is such implementation really so required provided that multiple block starts at the same line seems like bad-style coding? Anyway it could be called "Unfold current" or something similar.|
|2020-02-27 13:26||Fr0sT||New Issue|
|2020-02-28 11:55||Fr0sT||Tag Attached: code folding|
|2020-03-01 18:26||Martin Friebe||Assigned To||=> Martin Friebe|
|2020-03-01 18:26||Martin Friebe||Status||new => acknowledged|
|2020-03-01 18:26||Martin Friebe||LazTarget||=> -|
|2020-03-09 19:41||Martin Friebe||Note Added: 0121502|
|2020-03-09 19:41||Martin Friebe||Status||acknowledged => assigned|
|2020-03-09 19:41||Martin Friebe||Severity||minor => feature|
|2020-03-09 19:41||Martin Friebe||Widgetset||Win32/Win64 => Win32/Win64|
|2020-03-09 19:44||Martin Friebe||Note Edited: 0121502||View Revisions|
|2020-03-10 09:23||Fr0sT||Note Added: 0121524|