help.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:hyperhelp 作者: OdatNurd 项目源码 文件源码
def on_text_command(self, view, command, args):
        """
        Listen for double clicks in help files and, if they occur over links,
        follow the link instead of selecting the text.
        """
        if command == "drag_select" and args.get("by", None) == "words":
            event = args["event"]
            point = view.window_to_text((event["x"], event["y"]))

            if view.match_selector(point, "text.hyperhelp meta.link"):
                view.window().run_command("hyper_help_navigate", {"nav": "follow_link"})
                return ("noop")

        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号