MATLAB-extension-for-vscode icon indicating copy to clipboard operation
MATLAB-extension-for-vscode copied to clipboard

Expand selection is not working as expected on m files

Open Russiarain opened this issue 1 year ago • 2 comments

In other language source files, when we select one line and expand selection, if that selected line is inside of a closure or if-clause, the closure or if-clause will firstly be selected, but in .m files, when we expand selection on one line, the whole file will be selected.

Is this feature a part of vs code or we can fix it in this extension?

Russiarain avatar Oct 18 '23 02:10 Russiarain

I'm not sure where this is configurable. It appears that VS Code has some built-in support for this - if I surround some code with { ... }, triggering Expand Selection expands the selection to be within the {}. However, Expand Selection also appears to work in Python code with it's syntax, so my guess is that there is some configurability on a per-language basis.

dklilley avatar Oct 18 '23 14:10 dklilley

I couldn't find any settings for expand selection, maybe it's not configurable.

I remember there's some more fine-grained control over the selection behavior in other languages, for example, Dart extension added some feature related to Expand Selection in this release (#3332).

Russiarain avatar Oct 19 '23 01:10 Russiarain