From c506f7f8fe08f39ed076b98846e7eb144803d1e8 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 23 Feb 2021 00:15:13 +1100 Subject: [PATCH] Improves IDE highlighting of trailing $DYNAMIC/$STATIC metacommands Only one of $DYNAMIC or $STATIC is processed, the last appearing in a metacommand line, so highlight only that rather than the last appearance of each. Improves commmit af2752602f77845dc40c84ec13f0caa7dfdd08aa. --- source/ide/ide_methods.bas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 07c1a2592..a314497b6 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -8445,8 +8445,14 @@ SUB ideshowtext IF comment THEN COLOR 11 - IF metacommand AND ((checkKeyword$ = "$INCLUDE" OR checkKeyword$ = "$DYNAMIC" _ - OR checkKeyword$ = "$STATIC") AND INSTR(m + 1, UCASE$(a2$), checkKeyword$) = 0) THEN COLOR 10 + IF metacommand THEN + SELECT CASE checkKeyword$ + CASE "$INCLUDE" + IF INSTR(m + 1, UCASE$(a2$), checkKeyword$) = 0 THEN COLOR 10 + CASE "$DYNAMIC", "$STATIC" + IF INSTR(m + 1, UCASE$(a2$), "$DYNAMIC") = 0 AND INSTR(m + 1, UCASE$(a2$), "$STATIC") = 0 THEN COLOR 10 + END SELECT + END IF ELSEIF metacommand THEN COLOR 10 ELSEIF inquote OR thisChar$ = CHR$(34) THEN