From c90bdadb90fd1e5d0d49252424e6ebb663c56f95 Mon Sep 17 00:00:00 2001 From: He Linming Date: Wed, 20 Nov 2019 22:26:24 +0800 Subject: [PATCH] Fix jumpClick can't jump to another file (#1725) * Fix jumpClick can't jump to another file (#1721) * Clean up code --- src/renderer/components/editorWithTabs/editor.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/editorWithTabs/editor.vue b/src/renderer/components/editorWithTabs/editor.vue index eab916cf..339e2d67 100644 --- a/src/renderer/components/editorWithTabs/editor.vue +++ b/src/renderer/components/editorWithTabs/editor.vue @@ -675,11 +675,9 @@ export default { photoCreatorClick: (url) => { shell.openExternal(url) }, - jumpClick: (linkInfo) => { + jumpClick (linkInfo) { const { href } = linkInfo - if (href && href.startsWith('http')) { - shell.openExternal(href) - } + this.$store.dispatch('FORMAT_LINK_CLICK', { data: { href }, dirname: window.DIRNAME }) }, async imagePathAutoComplete (src) { const files = await this.$store.dispatch('ASK_FOR_IMAGE_AUTO_PATH', src)