1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 09:20:38 +00:00

Double-clicking an include file name opens the IDE at the error line.

When an error in an include file is reported, the IDE also shows what line inside the external file caused the error. Double-clicking the include line will open the file in a second instance of the IDE and position the cursor in the line that caused the last error.
This commit is contained in:
FellippeHeitor 2017-10-30 10:53:25 -02:00
parent 6b5cba468f
commit e5b7327533
2 changed files with 9 additions and 2 deletions

View file

@ -2706,7 +2706,11 @@ FUNCTION ide2 (ignore)
PCOPY 3, 0
_DELAY .2
SHELL QuotedFilename$(COMMAND$(0)) + " " + QuotedFilename$(f$)
p$ = QuotedFilename$(COMMAND$(0)) + " " + QuotedFilename$(f$)
IF errorLineInInclude > 0 AND idefocusline = idecy THEN
p$ = p$ + " -l:" + str2$(errorLineInInclude)
END IF
SHELL p$
IF IDE_AutoPosition THEN
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoPosition", "TRUE"

View file

@ -338,7 +338,7 @@ DIM SHARED idemessage AS STRING 'set by qb64-error(...) to the error message to
DIM SHARED optionexplicit AS _BYTE
DIM SHARED optionexplicit_cmd AS _BYTE
DIM SHARED ideStartAtLine AS LONG
DIM SHARED ideStartAtLine AS LONG, errorLineInInclude AS LONG
DIM SHARED outputfile_cmd$
DIM SHARED compilelog$
@ -1500,6 +1500,7 @@ layout = ""
layoutok = 0
NoChecks = 0
inclevel = 0
errorLineInInclude = 0
addmetainclude$ = ""
nextrunlineindex = 1
lasttype = 0
@ -2783,6 +2784,7 @@ DO
wholeline$ = x$
inclinenumber(inclevel) = inclinenumber(inclevel) + 1
'create extended error string 'incerror$'
errorLineInInclude = inclinenumber(inclevel)
e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
IF inclevel > 1 THEN
e$ = e$ + " (through "
@ -10721,6 +10723,7 @@ DO
continuelinefrom = 0
inclinenumber(inclevel) = inclinenumber(inclevel) + 1
'create extended error string 'incerror$'
errorLineInInclude = inclinenumber(inclevel)
e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
IF inclevel > 1 THEN
e$ = e$ + " (through "