Ah, yes....
In that case the (vertical line of) carets follow the selection.
And the selection is continuous.
1) If you fold code and make a normal selection (covering the fold) it will include the invisible (folded away) part of the code.
IMHO that is ok.
This allows to copy/cut entire procedures (while only seeing the header) and paste (move) them elsewhere.
2) If you fold code and make a column mode selection, it will select the columns in all lines of the text (visible or not).
That follows the above concept.
I can see that this may not necessarily be expected....
Both (include the folded lines in the selection, or excluding them) could be considered correct.
3) The setting of carets follows (2)
I have seen to few use cases, to judge whether this is the better choice....
I do agree there is a usecase for editing only the non-folded lines.
I can see that it's not for your usecase.
The desired behaviour would have to be added as a new feature. Probably with an option to toggle it.
Workarounds:
Depending on how many lines you need to set carets on...
* Use ctrl - shift - left mouse button.
This adds an extra caret. So you can set a caret each line.
* Use ctrl - shift - Insert followed by cursor down
ctrl - shift - Insert will add a caret at the current location
cursor down will move down (skipping folded lines)
And repeat those 2 steps.
You can record those 2 keystrokes as a macro, and assign them to a new key combo.
Then you have exactly what you need: Add a caret at current location, and move the original caret one visible line down.
https://wiki.freepascal.org/IDE_Window:_Editor_MacrosThe Marco will look like this
begin
ecPluginMultiCaretSetCaret;
ecDown;
end.
https://wiki.lazarus.freepascal.org/SynEdit_MultiCaret_pluginThe carets added in the above ways will not "cancel on move" (cursor up/down/left/right). They will "follow moves". So you need to press esc to get rid of the multi carets.
This can be changed in Tools > Options > Editor > General