]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetHyperlink.cpp
Fix bug #12795
[lyx.git] / src / insets / InsetHyperlink.cpp
index a3759e959e6b36bbab53528cffc7247818f7c058..a0c504cd9cb5d6ef2c9218e8b19f32c471db03f9 100644 (file)
@@ -17,6 +17,7 @@
 #include "FuncRequest.h"
 #include "FuncStatus.h"
 #include "LaTeXFeatures.h"
+#include "LyX.h"
 #include "output_docbook.h"
 #include "output_xhtml.h"
 #include "xml.h"
@@ -91,6 +92,12 @@ docstring InsetHyperlink::screenLabel() const
 
 void InsetHyperlink::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
+       // Ctrl + click: open hyperlink
+       if (cmd.action() == LFUN_MOUSE_RELEASE && cmd.modifier() == ControlModifier) {
+                       lyx::dispatch(FuncRequest(LFUN_INSET_EDIT));
+                       return;
+               }
+
        switch (cmd.action()) {
 
        case LFUN_INSET_EDIT:
@@ -184,9 +191,8 @@ void InsetHyperlink::latex(otexstream & os,
                                url.replace(pos, 1, from_ascii("\\") + chars_url[k]);
 
                // add "http://" when the type is web (type = empty)
-               // and no "://" or "run:" is given
+               // and no "://" is given
                if (url.find(from_ascii("://")) == string::npos
-                       && url.find(from_ascii("run:")) == string::npos
                        && utype.empty())
                        url = from_ascii("http://") + url;