gintau / bracket-match-highlighter

An extension of Adobe Brackets.
10 stars 9 forks source link

Breaks other extensions #5

Open mikkotikkanen opened 10 years ago

mikkotikkanen commented 10 years ago

When bracket-match-highlighter is installed, I get errors like

file:///C:/Users/user1/AppData/Roaming/Brackets/extensions/lib/codemirror.js

...and...

[Extension] failed to load C:/Users/user1/AppData/Roaming/Brackets/extensions/user/brackets-indentator Error: Script error for: ../../lib/codemirror

Which ends up randomly killing other extensions. I previously reported it to Brackets (https://github.com/adobe/brackets/issues/7782) but now it seems that as long as I don't have highlighter installed, everything's working just fine.

dnbard commented 10 years ago

Have the same issue.

vaughnroyko commented 10 years ago

Submitted a pull request to fix this issue. Hopefully it will be approved! Otherwise, you can install from my fork in the meantime, or make the same changes I did to your local file.

Yobikap commented 10 years ago

I've also fixed this issue. But it depends on which version you are running on.

This is my fix:

    function enableHighlighterAddOn(){
        // Enable match-highlighter plugin of CodeMirror2 (this plugin is default contained in sprint 37) 
        if(parseFloat(brackets.metadata.apiVersion) > 0.41){
            var script = document.createElement("script");
            script.src = "thirdparty/CodeMirror2/addon/search/match-highlighter.js";
            document.head.appendChild(script);
        }
    }
peterflynn commented 10 years ago

@vaughnroyko's fix was merged in PR #6, but @gintau needs to push a new version of the extension onto the registry so users will get the update... I've added a note in the PR about how to do this.