mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 11:25:08 +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:
parent
6b5cba468f
commit
e5b7327533
2 changed files with 9 additions and 2 deletions
|
@ -2706,7 +2706,11 @@ FUNCTION ide2 (ignore)
|
||||||
PCOPY 3, 0
|
PCOPY 3, 0
|
||||||
|
|
||||||
_DELAY .2
|
_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
|
IF IDE_AutoPosition THEN
|
||||||
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoPosition", "TRUE"
|
WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_AutoPosition", "TRUE"
|
||||||
|
|
|
@ -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 AS _BYTE
|
||||||
DIM SHARED optionexplicit_cmd 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 outputfile_cmd$
|
||||||
DIM SHARED compilelog$
|
DIM SHARED compilelog$
|
||||||
|
|
||||||
|
@ -1500,6 +1500,7 @@ layout = ""
|
||||||
layoutok = 0
|
layoutok = 0
|
||||||
NoChecks = 0
|
NoChecks = 0
|
||||||
inclevel = 0
|
inclevel = 0
|
||||||
|
errorLineInInclude = 0
|
||||||
addmetainclude$ = ""
|
addmetainclude$ = ""
|
||||||
nextrunlineindex = 1
|
nextrunlineindex = 1
|
||||||
lasttype = 0
|
lasttype = 0
|
||||||
|
@ -2783,6 +2784,7 @@ DO
|
||||||
wholeline$ = x$
|
wholeline$ = x$
|
||||||
inclinenumber(inclevel) = inclinenumber(inclevel) + 1
|
inclinenumber(inclevel) = inclinenumber(inclevel) + 1
|
||||||
'create extended error string 'incerror$'
|
'create extended error string 'incerror$'
|
||||||
|
errorLineInInclude = inclinenumber(inclevel)
|
||||||
e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
|
e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
|
||||||
IF inclevel > 1 THEN
|
IF inclevel > 1 THEN
|
||||||
e$ = e$ + " (through "
|
e$ = e$ + " (through "
|
||||||
|
@ -10721,6 +10723,7 @@ DO
|
||||||
continuelinefrom = 0
|
continuelinefrom = 0
|
||||||
inclinenumber(inclevel) = inclinenumber(inclevel) + 1
|
inclinenumber(inclevel) = inclinenumber(inclevel) + 1
|
||||||
'create extended error string 'incerror$'
|
'create extended error string 'incerror$'
|
||||||
|
errorLineInInclude = inclinenumber(inclevel)
|
||||||
e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
|
e$ = " in line " + str2(inclinenumber(inclevel)) + " of " + incname$(inclevel) + " included"
|
||||||
IF inclevel > 1 THEN
|
IF inclevel > 1 THEN
|
||||||
e$ = e$ + " (through "
|
e$ = e$ + " (through "
|
||||||
|
|
Loading…
Reference in a new issue