Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
Ops, fixed another bug with output form (when you press double-click).
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Octavian committed Dec 9, 2015
1 parent 1130bfc commit f2680b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/PawnPlus/Output.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@ private void outBox_DoubleClick(object sender, EventArgs e)

string SelectedText = this.outBox.SelectedText;

if (string.IsNullOrEmpty(SelectedText) == true || string.IsNullOrWhiteSpace(SelectedText) == true)
{
return;
}

Match match = Regex.Match(SelectedText, @"(.+)\\(.+)\((.+)\)\s:");

string filePath = match.Groups[2].ToString();
string filePath = Path.Combine(match.Groups[1].ToString(), match.Groups[2].ToString());

// Check if the file is an include.
if (Path.GetExtension(filePath) == ".inc")
{
filePath = match.Groups[2].ToString();

if (ProjectManager.IsOpen == true && File.Exists(Path.Combine(ProjectManager.Path, "includes", filePath)) == true) // Check if the "includes" folder from poject constains this include.
{
filePath = Path.Combine(ProjectManager.Path, "includes", filePath);
Expand Down

0 comments on commit f2680b7

Please sign in to comment.