matlab-IntelliJ-plugin icon indicating copy to clipboard operation
matlab-IntelliJ-plugin copied to clipboard

Variable highlighting not working properly

Open fabbra opened this issue 3 years ago • 2 comments

When double clicking a variable other occurrences of this variable are not always all highlighted.

Here are two examples using the following Matlab code. Both examples below (A and B) highlight the variable decgr with different results:

In example A the occurrences on lines 74 and 94 are NOT highlighted. In example B two occurrences on line 72 are NOT highlighted.

Example A: image

Example B: image

fabbra avatar Aug 30 '21 14:08 fabbra

Those are separate variables surely? decgr is redefined midway through line 72, all later references are referring to the new variable bound to that name, not the original. It looks like the highlighting is functioning as intended.

dcrew-dstl avatar Aug 31 '21 11:08 dcrew-dstl

We probably must have different expectations on how this highlighting should work.

I would have expected a similar behavior as in Matlab where ALL occurrences of the same variable (i.e. with the same name) are highlighted throughout an entire function/script even if gets redefined in the function.

Nonetheless, I stick to my point that there is a bug in the current way of functioning. Highlighting decgr at the end of line 72 should definitely also highlight decgr on line 74, right?

image

fabbra avatar Sep 06 '21 08:09 fabbra