From dd302b0b5f65de485aaab9bfdaeeff04fccf4d51 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Tue, 21 Sep 2021 01:28:50 -0300 Subject: [PATCH] Sends focus to debuggee when function `INPUT$()` is called. --- source/qb64.bas | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/qb64.bas b/source/qb64.bas index 6f9236aeb..0fa77c539 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -792,6 +792,7 @@ DIM SHARED linefragment AS STRING DIM SHARED arrayprocessinghappened AS INTEGER DIM SHARED stringprocessinghappened AS INTEGER DIM SHARED cleanupstringprocessingcall AS STRING +DIM SHARED inputfunctioncalled AS _BYTE DIM SHARED recompile AS INTEGER 'forces recompilation 'COMMON SHARED cmemlist() AS INTEGER DIM SHARED optionbase AS INTEGER @@ -1451,6 +1452,7 @@ linefragment$ = "" idn = 0 arrayprocessinghappened = 0 stringprocessinghappened = 0 +inputfunctioncalled = 0 subfuncn = 0 closedsubfunc = 0 subfunc = "" @@ -11206,6 +11208,13 @@ DO THENGOTO = 0 finishedline2: + IF inputfunctioncalled THEN + inputfunctioncalled = 0 + IF vWatchOn = 1 THEN + PRINT #12, "*__LONG_VWATCH_LINENUMBER= -5; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);" + END IF + END IF + IF arrayprocessinghappened = 1 THEN arrayprocessinghappened = 0 inclinenump$ = "" @@ -16582,6 +16591,12 @@ FUNCTION evaluatefunc$ (a2$, args AS LONG, typ AS LONG) targetid = currentid IF RTRIM$(id2.callname) = "func_stub" THEN Give_Error "Command not implemented": EXIT FUNCTION + IF RTRIM$(id2.callname) = "func_input" AND inputfunctioncalled = 0 THEN + inputfunctioncalled = -1 + IF vWatchOn = 1 THEN + PRINT #12, "*__LONG_VWATCH_LINENUMBER= -4; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);" + END IF + END IF SetDependency id2.Dependency