matlab-IntelliJ-plugin
matlab-IntelliJ-plugin copied to clipboard
Variable highlighting not working properly
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:
Example B:
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.
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?