From ce9a0c07c646265cc41227aad0a6e957d62235e4 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Thu, 26 Oct 2017 10:20:19 -0200 Subject: [PATCH] First attempt at line numbers. So far: - Line numbers show (they still get stuck if you create a new empty file). - Text is shifted right accordingly. --- source/ide/ide_methods.bas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index be73f2c1d..286a15411 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -8203,6 +8203,15 @@ SUB ideshowtext LOCATE y + 3, 1 COLOR 7, 1 PRINT CHR$(179); 'clear prev bookmarks from lhs + + IF l <= iden THEN + LOCATE y + 3, 2 + l$ = SPACE$(LEN(STR$(iden)) + 2) + MID$(l$, 1) = STR$(l) + PRINT l$; + END IF + + IF l = idefocusline AND idecy <> l THEN COLOR 7, 4 'Line with error gets a red background ELSEIF idecy = l OR (l >= idecy_multilinestart AND l <= idecy_multilineend) THEN @@ -8523,8 +8532,8 @@ SUB ideshowtext LOOP ' verifying the code and growing the array during the IDE passes. IF InValidLine(l) AND 1 THEN COLOR 7 - IF 2 + m - idesx >= 2 AND 2 + m - idesx < idewx THEN - LOCATE y + 3, 2 + m - idesx + IF 2 + m - idesx >= 2 AND (2 + m - idesx) + LEN(STR$(iden)) + 2 < idewx - 1 THEN + LOCATE y + 3, (2 + m - idesx) + LEN(STR$(iden)) + 2 PRINT thisChar$; END IF