mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 13:50:36 +00:00
Double-clicking on an $INCLUDE statement opens the file in a new window.
This commit is contained in:
parent
f5505c5734
commit
60e4054aa5
|
@ -4,4 +4,4 @@ DIM SHARED AutoBuildMsg AS STRING
|
||||||
Version$ = "1.1"
|
Version$ = "1.1"
|
||||||
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
|
'BuildNum format is YYYYMMDD/id, where id is a ever-increasing
|
||||||
'integer. If you make a change, update the date and increase the id!
|
'integer. If you make a change, update the date and increase the id!
|
||||||
BuildNum$ = "20170429/52"
|
BuildNum$ = "20170513/53"
|
||||||
|
|
|
@ -157,6 +157,8 @@ DIM SHARED QuickNavTotal AS LONG
|
||||||
DIM SHARED QuickNavHistory(0) AS LONG
|
DIM SHARED QuickNavHistory(0) AS LONG
|
||||||
DIM SHARED ModifyCOMMAND$
|
DIM SHARED ModifyCOMMAND$
|
||||||
DIM SHARED EnteringRGB AS _BYTE
|
DIM SHARED EnteringRGB AS _BYTE
|
||||||
|
DIM SHARED ActiveINCLUDELink AS LONG
|
||||||
|
DIM SHARED ActiveINCLUDELinkFile AS STRING
|
||||||
|
|
||||||
'--------------------------------------------------------------------------------
|
'--------------------------------------------------------------------------------
|
||||||
TYPE idedbptype
|
TYPE idedbptype
|
||||||
|
|
|
@ -2480,6 +2480,14 @@ FUNCTION ide2 (ignore)
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN
|
IF idecy > iden THEN
|
||||||
GOTO regularTextBox_click
|
GOTO regularTextBox_click
|
||||||
|
ELSEIF ActiveINCLUDELink > 0 THEN
|
||||||
|
'Double-click on an $INCLUDE statement launches that file in
|
||||||
|
'a separate instance of QB64:
|
||||||
|
p$ = idepath$ + pathsep$
|
||||||
|
f$ = p$ + ActiveINCLUDELinkFile
|
||||||
|
IF _FILEEXISTS(f$) THEN
|
||||||
|
SHELL _DONTWAIT QuotedFilename$(COMMAND$(0)) + " " + QuotedFilename$(f$)
|
||||||
|
END IF
|
||||||
ELSE
|
ELSE
|
||||||
a$ = idegetline$(idecy)
|
a$ = idegetline$(idecy)
|
||||||
IF LEN(a$) = 0 THEN GOTO regularTextBox_click
|
IF LEN(a$) = 0 THEN GOTO regularTextBox_click
|
||||||
|
@ -7731,6 +7739,8 @@ SUB ideshowtext
|
||||||
|
|
||||||
IF idecy > 1 THEN b$ = idegetline(idecy - 1) ELSE b$ = ""
|
IF idecy > 1 THEN b$ = idegetline(idecy - 1) ELSE b$ = ""
|
||||||
|
|
||||||
|
ActiveINCLUDELink = 0
|
||||||
|
|
||||||
FOR y = 0 TO (idewy - 9)
|
FOR y = 0 TO (idewy - 9)
|
||||||
LOCATE y + 3, 1
|
LOCATE y + 3, 1
|
||||||
COLOR 7, 1
|
COLOR 7, 1
|
||||||
|
@ -7745,6 +7755,7 @@ SUB ideshowtext
|
||||||
|
|
||||||
IF l <= iden THEN
|
IF l <= iden THEN
|
||||||
a$ = idegetline(l)
|
a$ = idegetline(l)
|
||||||
|
link_idecx = 0
|
||||||
IF l = idecy THEN
|
IF l = idecy THEN
|
||||||
IF idecx <= LEN(a$) THEN
|
IF idecx <= LEN(a$) THEN
|
||||||
cc = ASC(a$, idecx)
|
cc = ASC(a$, idecx)
|
||||||
|
@ -7850,6 +7861,17 @@ SUB ideshowtext
|
||||||
IF INSTR("0123456789", MID$(a2$, idecx, 1)) = 0 THEN EnteringRGB = -1
|
IF INSTR("0123456789", MID$(a2$, idecx, 1)) = 0 THEN EnteringRGB = -1
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
IF idecx_comment AND INSTR(a2$, "$INCLUDE:'") > 0 THEN
|
||||||
|
link_idecx = LEN(a$)
|
||||||
|
ActiveINCLUDELink = idecy
|
||||||
|
FindApostrophe1 = INSTR(a$, ":'") + 1
|
||||||
|
FindApostrophe2 = INSTR(FindApostrophe1 + 1, a$, "'")
|
||||||
|
ActiveINCLUDELinkFile = MID$(a$, FindApostrophe1 + 1, FindApostrophe2 - FindApostrophe1 - 1)
|
||||||
|
p$ = idepath$ + pathsep$
|
||||||
|
f$ = p$ + ActiveINCLUDELinkFile
|
||||||
|
IF _FILEEXISTS(f$) THEN a$ = a$ + " --> Double-click to open"
|
||||||
|
END IF
|
||||||
END IF 'l = idecy
|
END IF 'l = idecy
|
||||||
|
|
||||||
a2$ = SPACE$(idesx + (idewx - 3))
|
a2$ = SPACE$(idesx + (idewx - 3))
|
||||||
|
@ -7886,6 +7908,8 @@ SUB ideshowtext
|
||||||
IF LEFT$(LTRIM$(a$), 2) = "'$" OR LEFT$(LTRIM$(a$), 1) = "$" THEN metacommand = -1: comment = 0
|
IF LEFT$(LTRIM$(a$), 2) = "'$" OR LEFT$(LTRIM$(a$), 1) = "$" THEN metacommand = -1: comment = 0
|
||||||
COLOR 13
|
COLOR 13
|
||||||
|
|
||||||
|
IF (link_idecx > 0 AND m > link_idecx) THEN metacommand = 0: comment = -1
|
||||||
|
|
||||||
IF comment THEN
|
IF comment THEN
|
||||||
COLOR 11
|
COLOR 11
|
||||||
ELSEIF metacommand THEN
|
ELSEIF metacommand THEN
|
||||||
|
|
Loading…
Reference in a new issue