1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-05 01:50:25 +00:00

Centers current line while debugging.

It now centers the current line when using QuickNav too.
This commit is contained in:
FellippeHeitor 2021-07-19 12:46:37 -03:00
parent 43c2dbc984
commit 403e45b2c4

View file

@ -695,6 +695,15 @@ FUNCTION ide2 (ignore)
IdeDebugMode = 1
EnterDebugMode:
IF idehelp THEN
idewy = idewy + idesubwindow
idehelp = 0
idesubwindow = 0
skipdisplay = 0
IdeSystem = 1
retval = 1: GOSUB redrawItAll
END IF
idecompiling = 0
ready = 1
_RESIZE OFF
@ -1331,8 +1340,8 @@ FUNCTION ide2 (ignore)
ideselect = 0
idecy = QuickNavHistory(QuickNavTotal).idecy
idecx = QuickNavHistory(QuickNavTotal).idecx
idesy = QuickNavHistory(QuickNavTotal).idesy
idesx = QuickNavHistory(QuickNavTotal).idesx
idecentercurrentline
QuickNavTotal = QuickNavTotal - 1
GOTO ideloop
END IF
@ -6312,6 +6321,7 @@ SUB DebugMode
l = CVL(value$)
idecy = l
idefocusline = 0
idecentercurrentline
ideshowtext
clearStatusWindow 1
IF cmd$ = "breakpoint" THEN
@ -7744,6 +7754,11 @@ FUNCTION idegetline$ (i)
idegetline$ = MID$(idet$, ideli + 4, CVL(MID$(idet$, ideli, 4)))
END FUNCTION
SUB idecentercurrentline
idesy = idecy - (idewy - 8) \ 2
IF idesy < 1 THEN idesy = 1
END SUB
SUB idegotoline (i)
IF idel = i THEN EXIT SUB
IF i < 1 THEN ERROR 5