From ec3ea6bd49a4bc25f1e6cb9cf8b765fa5a542e99 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sun, 27 Sep 2020 22:20:43 -0700 Subject: [PATCH] Allowed clicking on 'file:' references --- IDE/src/ui/OutputWidget.bf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/IDE/src/ui/OutputWidget.bf b/IDE/src/ui/OutputWidget.bf index 9bc5f8f5..646d1367 100644 --- a/IDE/src/ui/OutputWidget.bf +++ b/IDE/src/ui/OutputWidget.bf @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Beefy.widgets; using Beefy.theme.dark; using Beefy.gfx; +using System.IO; namespace IDE.ui { @@ -171,6 +172,19 @@ namespace IDE.ui } } } + + if (selectionText.StartsWith(" ")) + { + int colonPos = selectionText.IndexOf(": "); + if (colonPos > 0) + { + String testPath = scope String(selectionText, 1, colonPos - 1); + if (File.Exists(testPath)) + { + filePath = scope:: String(testPath); + } + } + } } if ((errLine != -1) && (errLineChar != -1) && (filePath != null))