mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 00:55:09 +00:00
Add tweaks to Line Numbers in config.txt.
- ShowLineNumbersSeparator will separate the line numbers panel from the main text are with CHR$(179); - ShowLineNumbersUseBG will use the same color assigned to current line highlight in the line numbers panel.
This commit is contained in:
parent
fb9a54a210
commit
40da21aacd
2 changed files with 30 additions and 3 deletions
|
@ -12,6 +12,7 @@ DIM SHARED MouseButtonSwapped AS _BYTE
|
||||||
DIM SHARED PasteCursorAtEnd AS _BYTE
|
DIM SHARED PasteCursorAtEnd AS _BYTE
|
||||||
DIM SHARED SaveExeWithSource AS _BYTE
|
DIM SHARED SaveExeWithSource AS _BYTE
|
||||||
DIM SHARED IDEShowErrorsImmediately AS _BYTE
|
DIM SHARED IDEShowErrorsImmediately AS _BYTE
|
||||||
|
DIM SHARED ShowLineNumbersSeparator AS _BYTE, ShowLineNumbersUseBG AS _BYTE
|
||||||
|
|
||||||
IF LoadedIDESettings = 0 THEN
|
IF LoadedIDESettings = 0 THEN
|
||||||
'We only want to load the file once when QB64 first starts
|
'We only want to load the file once when QB64 first starts
|
||||||
|
@ -204,6 +205,32 @@ IF LoadedIDESettings = 0 THEN
|
||||||
ShowLineNumbers = 0
|
ShowLineNumbers = 0
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
result = ReadConfigSetting("ShowLineNumbersSeparator", value$)
|
||||||
|
IF result THEN
|
||||||
|
IF value$ = "TRUE" OR VAL(value$) = -1 THEN
|
||||||
|
ShowLineNumbersSeparator = -1
|
||||||
|
ELSE
|
||||||
|
ShowLineNumbersSeparator = 0
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbersSeparator", "FALSE"
|
||||||
|
END IF
|
||||||
|
ELSE
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbersSeparator", "TRUE"
|
||||||
|
ShowLineNumbersSeparator = -1
|
||||||
|
END IF
|
||||||
|
|
||||||
|
result = ReadConfigSetting("ShowLineNumbersUseBG", value$)
|
||||||
|
IF result THEN
|
||||||
|
IF value$ = "TRUE" OR VAL(value$) = -1 THEN
|
||||||
|
ShowLineNumbersUseBG = -1
|
||||||
|
ELSE
|
||||||
|
ShowLineNumbersUseBG = 0
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbersUseBG", "FALSE"
|
||||||
|
END IF
|
||||||
|
ELSE
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbersUseBG", "TRUE"
|
||||||
|
ShowLineNumbersUseBG = -1
|
||||||
|
END IF
|
||||||
|
|
||||||
result = ReadConfigSetting("BracketHighlight", value$)
|
result = ReadConfigSetting("BracketHighlight", value$)
|
||||||
IF result THEN
|
IF result THEN
|
||||||
IF value$ = "TRUE" OR VAL(value$) = -1 THEN
|
IF value$ = "TRUE" OR VAL(value$) = -1 THEN
|
||||||
|
|
|
@ -8258,16 +8258,16 @@ SUB ideshowtext
|
||||||
PRINT CHR$(179); 'clear prev bookmarks from lhs
|
PRINT CHR$(179); 'clear prev bookmarks from lhs
|
||||||
|
|
||||||
IF ShowLineNumbers THEN
|
IF ShowLineNumbers THEN
|
||||||
COLOR , 6
|
IF ShowLineNumbersUseBG THEN COLOR , 6
|
||||||
'IF l = idecy THEN COLOR , 6
|
|
||||||
PRINT SPACE$(maxLineNumberLength);
|
PRINT SPACE$(maxLineNumberLength);
|
||||||
IF l <= iden THEN
|
IF l <= iden THEN
|
||||||
l2$ = STR$(l)
|
l2$ = STR$(l)
|
||||||
IF POS(1) - (LEN(l2$) + 1) >= 2 THEN
|
IF POS(1) - (LEN(l2$) + 1) >= 2 THEN
|
||||||
LOCATE y + 3, POS(1) - (LEN(l2$) + 1)
|
LOCATE y + 3, POS(1) - (LEN(l2$) + 1)
|
||||||
PRINT l2$; 'CHR$(179);
|
PRINT l2$;
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
IF ShowLineNumbersSeparator THEN LOCATE y + 3, 1 + maxLineNumberLength: PRINT CHR$(179);
|
||||||
COLOR , 1
|
COLOR , 1
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue