mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-28 11:17:46 +00:00
Change to FUNCTION idesubs$, which now checks if the cursor is currently inside any SUB/FUNCTION to position the selection properly in the list.
This commit is contained in:
parent
febdb30be3
commit
dc00352274
1 changed files with 17 additions and 7 deletions
|
@ -6366,6 +6366,7 @@ sep = CHR$(0)
|
|||
'-------- init --------
|
||||
|
||||
ly$ = MKL$(1)
|
||||
CurrentlyViewingWhichSUBFUNC = 1
|
||||
l$ = ideprogname$
|
||||
IF l$ = "" THEN l$ = "Untitled" + tempfolderindexstr$
|
||||
FOR y = 1 TO iden
|
||||
|
@ -6380,6 +6381,14 @@ FOR y = 1 TO iden
|
|||
a$ = RTRIM$(LEFT$(a$, LEN(a$) - 7))
|
||||
END IF
|
||||
ly$ = ly$ + MKL$(y)
|
||||
|
||||
'Check if the cursor is currently inside this SUB/FUNCTION to position the
|
||||
'selection properly in the list.
|
||||
IF idecy >= y THEN
|
||||
CurrentlyViewingWhichSUBFUNC = (LEN(ly$) / 4)
|
||||
END IF
|
||||
'End of current SUB/FUNCTION check
|
||||
|
||||
IF sf = 1 THEN
|
||||
a$ = RIGHT$(a$, LEN(a$) - 4)
|
||||
ELSE
|
||||
|
@ -6426,7 +6435,7 @@ o(i).y = 1
|
|||
'68
|
||||
o(i).w = idewx - 12: o(i).h = idewy + idesubwindow - 9
|
||||
o(i).txt = idenewtxt(l$)
|
||||
o(i).sel = 1
|
||||
o(i).sel = CurrentlyViewingWhichSUBFUNC
|
||||
o(i).nam = idenewtxt("Program Items")
|
||||
|
||||
|
||||
|
@ -9977,3 +9986,4 @@ idecx = idecx + LEN(messagestr$)
|
|||
END SUB
|
||||
|
||||
'$INCLUDE:'wiki\wiki_methods.bas'
|
||||
|
||||
|
|
Loading…
Reference in a new issue