You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For M scripts the syntax highlighting and code folding breaks if keywords (case-insensitive) are used as structure field names.
Steps to Reproduce the Issue
Create M file with the following content
function [s] = foo()
s = struct();
s.End =42;
s.if =0;
end
"End" in s.End is highlighted as keyword (note that only "end" is an actual keyword, maybe only in newer MATLAB versions(?))
3, "if" in s.if is highlighted as keyword
Code-folding matches "function" with "s.End"
Code-folding applies a new bracket for "s.if"
Expected Behavior
Field names that happen to be keyword names are not highlighted, especially not if they use different case
"function" is matched with the last line for code folding and this is the only folding option.
Actual Behavior
"End" in s.End is highlighted as keyword (note that only "end" is an actual keyword, maybe only in newer MATLAB versions(?))
"if" in s.if is highlighted as keyword
Code-folding matches "function" with "s.End"
Code-folding starts a new bracket for "s.if"
Debug Information
Notepad++ v7.7 (64-bit)
Build time : May 19 2019 - 13:05:35
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppSaveAsAdmin.dll XMLTools.dll
The text was updated successfully, but these errors were encountered:
Thanks for handling and transferring the issue.
Ideally, any legal code would be handled correctly but I understand that there is not much to gain by treating obscure edge cases I stumbled upon when investigating the real issue. "start"/"end" make a nice pairing, though...
Description of the Issue
For M scripts the syntax highlighting and code folding breaks if keywords (case-insensitive) are used as structure field names.
Steps to Reproduce the Issue
3, "if" in s.if is highlighted as keyword
Expected Behavior
Actual Behavior
Debug Information
Notepad++ v7.7 (64-bit)
Build time : May 19 2019 - 13:05:35
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 10 (64-bit)
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppSaveAsAdmin.dll XMLTools.dll
The text was updated successfully, but these errors were encountered: