From 893a12e7ea3983d6f7a99d6e16f4aa7f00a6e699 Mon Sep 17 00:00:00 2001
From: Christian Petrov <cpetrov@eclipsesource.com>
Date: Mon, 26 Jan 2015 10:15:20 +0100
Subject: [PATCH] [tern addon] open [doc] link in a new tab/window

Opening the documentation in the same window navigates away from the
code editor.
---
 addon/tern/tern.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/addon/tern/tern.js b/addon/tern/tern.js
index 86729e2d3..80bf87cd4 100644
--- a/addon/tern/tern.js
+++ b/addon/tern/tern.js
@@ -252,7 +252,9 @@
           tip.appendChild(document.createTextNode(" — " + data.doc));
         if (data.url) {
           tip.appendChild(document.createTextNode(" "));
-          tip.appendChild(elt("a", null, "[docs]")).href = data.url;
+          var child = tip.appendChild(elt("a", null, "[docs]"));
+          child.href = data.url;
+          child.target = "_blank";
         }
       }
       tempTooltip(cm, tip);
-- 
GitLab