Not selectable collapsed regions / markers

I am using two collapsed marked regions (above and below) to temporarily show only a single line of text. I don’t use replacedWith option, I just want to hide everything but single line.

Is there a way to make collapsed ranges not selectable? For example: I’d like that select all command only selects the line in focus but not also the hidden text.

Can this be achieved with markers? Or is there maybe any other (evident) way to go with that?

Thanks,
iztok

Did you try making the one at the start inclusiveLeft and the one at the end inclusiveRight? That should make it impossible to put the selection ends before/after them, and thus make their content unselectable.

I tried it now … and of course it works! Thanks, didn’t think this will do that! I am baffled every time how good codemirror is!
Iztok