From 88e29364204962b6b00009ddb320994460ff8ebe Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 17 Mar 2022 11:37:09 -0700 Subject: [PATCH] Fixed GotoRefrenceAtLine for VS-style error locations --- IDE/src/ui/OutputWidget.bf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/IDE/src/ui/OutputWidget.bf b/IDE/src/ui/OutputWidget.bf index 812e94f7..c50c4a8e 100644 --- a/IDE/src/ui/OutputWidget.bf +++ b/IDE/src/ui/OutputWidget.bf @@ -74,6 +74,22 @@ namespace IDE.ui if ((filePath.Contains('\\')) || (filePath.Contains('/'))) break; } + else + { + // filePath:(line,col) + int commaPos = lineStr.IndexOf(','); + if (commaPos != -1) + { + if ((Int32.Parse(lineStr.Substring(0, commaPos)) case .Ok(out errLine)) && + (Int32.Parse(lineStr.Substring(commaPos + 1)) case .Ok(out errLineChar))) + { + filePath = scope:: String(selectionText, 0, startIdx - 1); + filePath.Trim(); + if ((filePath.Contains('\\')) || (filePath.Contains('/'))) + break; + } + } + } } else {