mark-wiemer/ahkpp

Issue with syntax highlighting when updating or reverting extension

Closed this issue · 5 comments

Not sure with what version I started noticing this, but it happens with current/prior releases and the pre-releases.

Pre update/revert example:
SyntaxHighlighting_1
Post update/revert example
SyntaxHighlighting_2

This can be resolved by formatting the document. If formatting produces any undesired changes to formatting layout, just use Ctrl+Z to undo the formatting, but will retain the correct syntax highlighting.

Also, updating/reverting the extension can cause the 'red conflict underscore' to appear - formatting will also resolve this edit: requires Developer: Reload Window.

Can you paste the image text as plaintext as well so I can investigate? The image helps for the colors of course, thank you :)

Can you clarify what steps you're taking? Is this when changing between AHK++ versions / releases? Are there other scenarios that cause this?

global    gTagChar      := chr(0x2605)
        , gFuncPtn      := buildPtn_FUNC()
        , gClassPtn     := buildPtn_CLS()
        , gMQSPtn       := buildPtn_MStr()
        , gIFPtn        := buildPtn_IF()
        , gLblPtn       := buildPtn_Label()
        , gHotkeyPtn    := buildPtn_Hotkey()
        , gHotStrPtn    := '^:(?<Opts>[^:]+)*:(?<Trig>[^:]+)::'
        , gLCPtn        := '(*UCP)(?m)(?<=\s|)(?<!``);[^\v]*'
        , gBCPtn        := '(*UCP)(?m)^\h*(/\*((?>[^*/]+|\*[^/]|/[^*])*)(?>(?-2)(?-1))*(?:\*/|\Z))'
        , gQSPtn        := '(*UCP)(?m)(?:`'`'|`'(?>[^`'\v]+(?:(?<=``)`')?)+`'|""|"(?>[^"\v]+(?:(?<=``)")?)+")'
;       , gBracePtn     := '(\{(?>[^}{]+|(?-1))*\})'

Can you clarify what you're doing to update/revert? Is this just going into the Extensions viewlet and installing a different version?

Yes, it happens when switching between versions. It also happens when using the manual Update option (if one is available) when the Auto Update option is unchecked.

Unfortunately I'll have to close this as out of scope. There is little I can do to reproduce and diagnose issues like this, and if it's fixed by restarting the extension host (F1 > Developer: Restart Extension Host), I'm going to accept that as a sufficient workaround. Do let me know if it troubles you more often, though.

Note that you can create custom keyboard shortcuts for any command, so it shouldn't be too inconvenient. In short, I don't expect folks to be switching versions during their coding sessions all too often :) I appreciate the report, though