﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3843	"SciTE tool ""Jump to Function Prod"" unable to find function definition while execution is fine"	anonymous		"In the case where local files are included with ""<>"", SciTE tool ""Jump to Function Prod"" unable to find function definition while execution is fine

Steps to reproduce:

Create 3 files.

test.au3
{{{
#include <b\a.au3>
bfunc()
}}}

b\a.au3
{{{
#include-once
#include <b.au3>
}}}

b\b.au3
{{{
#include-once

Func bfunc()
	ConsoleWrite(""bfunc"" & @CRLF)
EndFunc
}}}

From test.au3, try ""Jump to Function Prod"" on ""bfunc"".

The console will display ""Unable to find function definition: bfunc""

From my analysis, `AutoItGotoDefinition:GetIncludes` is made under the assumption that local files are always included with `quotes`.
However, this style is not enforced by the runner.

Should this be considered as a bug?

As a workaround, I patched the file **AutoIt3\SciTE\lua\AutoItGotoDefinition.lua** like this

{{{
--- a\AutoIt3\SciTE\lua\AutoItGotoDefinition.lua
+++ b\AutoIt3\SciTE\lua\AutoItGotoDefinition.lua
@@ -164,6 +164,10 @@
 	for line in io.lines(file) do
 		-- Force lower case
 		local include = line:match(pattern_library)
+		if include and cpath ~= """" and self:FileExists(cpath .. include) then
+			include = cpath .. include
+			self:DebugPrint(""Include3 updated: "" .. cpath .. include)
+		end
 		if include and not files[include] then
 			self:DebugPrint(""Include1: "" .. include)
 			files[include] = { IsLibrary=true, Processed=false }
}}}


"	Bug	closed		AutoIt	3.3.14.0	None	Fixed		
