Giter Site home page Giter Site logo

Comments (4)

wearhere avatar wearhere commented on July 24, 2024

This is a regression since 80bc156. The way it used to work was that, in -om_handleLinkClickWithActionInformation:, -om_shouldHandleLinkClickWithActionInformation: would return NO and the plugin would let Xcode handle the click. Perhaps the plugin is now intercepting the URL before -om_handleLinkClickWithActionInformation: kicks in.

from dash-plugin-for-xcode.

Kapeli avatar Kapeli commented on July 24, 2024

-om_handleLinkClickWithActionInformation: still handles things. This is the action information I'm seeing:

    WebActionButtonKey = 0;
    WebActionElementKey =     {
        WebElementDOMNode = "<DOMText [#text]: 0x128890cf0 'Terminal'>";
        WebElementFrame = "<WebFrame: 0x7fa0a11e7470>";
        WebElementIsContentEditableKey = 0;
        WebElementIsInScrollBar = 0;
        WebElementIsSelected = 0;
        WebElementLinkIsLive = 1;
        WebElementLinkLabel = "SLTerminal.h";
        WebElementLinkTitle = "";
        WebElementLinkURL = "file:///Users/bogdan/Library/Developer/Shared/Documentation/DocSets/com.inkling.Subliminal.docset/Contents/Resources/Documents/SLTerminal.h";
        WebElementTargetFrame = "<WebFrame: 0x7fa0a11e7470>";
    };
    WebActionModifierFlagsKey = 0;
    WebActionNavigationTypeKey = 0;
    WebActionOriginalURLKey = "file:///Users/bogdan/Library/Developer/Shared/Documentation/DocSets/com.inkling.Subliminal.docset/Contents/Resources/Documents/SLTerminal.h";

If you look at wearhere@80bc156#diff-6f1abccc519eaee8c98910b91d43e956L148 at line 151 you'll see that the return nil was removed. What that return nil used to do is NSBeep() if the regex didn't match anything.

So, before 80bc156 things still did not work, the only difference it was that it NSBeep'd instead of triggering a Dash search.

I'll fix this exact scenario by refusing to handle links that have a path that ends in .h. Can you think of other scenarios where this might happen?

from dash-plugin-for-xcode.

wearhere avatar wearhere commented on July 24, 2024

Not off the top of my head--we should refuse to handle any links with extensions, but I think it would be safest to blacklist those extensions explicitly to avoid misinterpreting a period somewhere else in a URL.

from dash-plugin-for-xcode.

Kapeli avatar Kapeli commented on July 24, 2024

Great. I'll leave things as-is and will adjust if any other bugs are reported. Thanks once again for your help! 👍

from dash-plugin-for-xcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.