mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-06 02:20:25 +00:00
Merge remote-tracking branch 'remotes/origin/idetweaks'
# Fixed Conflicts: # source/ide/ide_global.bas
This commit is contained in:
commit
99352ea125
|
@ -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,45 @@ IF LoadedIDESettings = 0 THEN
|
||||||
IDEShowErrorsImmediately = -1
|
IDEShowErrorsImmediately = -1
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
result = ReadConfigSetting("ShowLineNumbers", value$)
|
||||||
|
IF result THEN
|
||||||
|
IF value$ = "TRUE" OR VAL(value$) = -1 THEN
|
||||||
|
ShowLineNumbers = -1
|
||||||
|
ELSE
|
||||||
|
ShowLineNumbers = 0
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbers", "FALSE"
|
||||||
|
END IF
|
||||||
|
ELSE
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbers", "FALSE"
|
||||||
|
ShowLineNumbers = 0
|
||||||
|
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
|
||||||
|
|
|
@ -166,8 +166,9 @@ DIM SHARED ModifyCOMMAND$
|
||||||
DIM SHARED EnteringRGB AS _BYTE
|
DIM SHARED EnteringRGB AS _BYTE
|
||||||
DIM SHARED ActiveINCLUDELink AS LONG
|
DIM SHARED ActiveINCLUDELink AS LONG
|
||||||
DIM SHARED ActiveINCLUDELinkFile AS STRING
|
DIM SHARED ActiveINCLUDELinkFile AS STRING
|
||||||
DIM SHARED HideCurrentLineHighlight AS _BYTE
|
DIM SHARED HideCurrentLineHighlight AS _BYTE, ShowLineNumbers AS _BYTE
|
||||||
DIM SHARED idegotobox_LastLineNum AS LONG
|
DIM SHARED idegotobox_LastLineNum AS LONG, maxLineNumberLength AS LONG
|
||||||
|
|
||||||
'--------------------------------------------------------------------------------
|
'--------------------------------------------------------------------------------
|
||||||
TYPE idedbptype
|
TYPE idedbptype
|
||||||
x AS LONG
|
x AS LONG
|
||||||
|
@ -206,6 +207,7 @@ DIM SHARED menus AS INTEGER, idecontextualmenuID AS INTEGER
|
||||||
DIM SHARED ideeditmenuID AS INTEGER
|
DIM SHARED ideeditmenuID AS INTEGER
|
||||||
DIM SHARED OptionsMenuID AS INTEGER, OptionsMenuSwapMouse AS INTEGER, OptionsMenuPasteCursor AS INTEGER
|
DIM SHARED OptionsMenuID AS INTEGER, OptionsMenuSwapMouse AS INTEGER, OptionsMenuPasteCursor AS INTEGER
|
||||||
DIM SHARED OptionsMenuShowErrorsImmediately AS INTEGER
|
DIM SHARED OptionsMenuShowErrorsImmediately AS INTEGER
|
||||||
|
DIM SHARED ViewMenuID AS INTEGER, ViewMenuShowLineNumbers AS INTEGER
|
||||||
DIM SHARED RunMenuID AS INTEGER, RunMenuSaveExeWithSource AS INTEGER, brackethighlight AS INTEGER
|
DIM SHARED RunMenuID AS INTEGER, RunMenuSaveExeWithSource AS INTEGER, brackethighlight AS INTEGER
|
||||||
DIM SHARED multihighlight AS INTEGER, keywordHighlight AS INTEGER
|
DIM SHARED multihighlight AS INTEGER, keywordHighlight AS INTEGER
|
||||||
DIM SHARED PresetColorSchemes AS INTEGER, TotalColorSchemes AS INTEGER, ColorSchemes$(0)
|
DIM SHARED PresetColorSchemes AS INTEGER, TotalColorSchemes AS INTEGER, ColorSchemes$(0)
|
||||||
|
|
|
@ -249,9 +249,16 @@ FUNCTION ide2 (ignore)
|
||||||
ideeditmenuID = m
|
ideeditmenuID = m
|
||||||
IdeMakeEditMenu
|
IdeMakeEditMenu
|
||||||
|
|
||||||
m = m + 1: i = 0
|
m = m + 1: i = 0: ViewMenuID = m
|
||||||
menu$(m, i) = "View": i = i + 1
|
menu$(m, i) = "View": i = i + 1
|
||||||
menu$(m, i) = "#SUBs... F2": i = i + 1
|
menu$(m, i) = "#SUBs... F2": i = i + 1
|
||||||
|
|
||||||
|
ViewMenuShowLineNumbers = i
|
||||||
|
menu$(m, i) = "#Line numbers": i = i + 1
|
||||||
|
IF ShowLineNumbers THEN
|
||||||
|
menu$(ViewMenuID, ViewMenuShowLineNumbers) = CHR$(7) + menu$(ViewMenuID, ViewMenuShowLineNumbers)
|
||||||
|
END IF
|
||||||
|
|
||||||
menusize(m) = i - 1
|
menusize(m) = i - 1
|
||||||
|
|
||||||
m = m + 1: i = 0
|
m = m + 1: i = 0
|
||||||
|
@ -725,6 +732,7 @@ FUNCTION ide2 (ignore)
|
||||||
'main loop
|
'main loop
|
||||||
DO
|
DO
|
||||||
ideloop:
|
ideloop:
|
||||||
|
IF ShowLineNumbers THEN maxLineNumberLength = LEN(STR$(iden)) + 1 ELSE maxLineNumberLength = 0
|
||||||
idecontextualmenu = 0
|
idecontextualmenu = 0
|
||||||
idedeltxt 'removes temporary strings (typically created by guibox commands) by setting an index to 0
|
idedeltxt 'removes temporary strings (typically created by guibox commands) by setting an index to 0
|
||||||
IF idesubwindow <> 0 THEN _RESIZE OFF ELSE _RESIZE ON
|
IF idesubwindow <> 0 THEN _RESIZE OFF ELSE _RESIZE ON
|
||||||
|
@ -2633,7 +2641,7 @@ FUNCTION ide2 (ignore)
|
||||||
ideselecty1 = wholeword.selecty1
|
ideselecty1 = wholeword.selecty1
|
||||||
idecy = wholeword.idecy
|
idecy = wholeword.idecy
|
||||||
END IF
|
END IF
|
||||||
newposition = mX - 1 + idesx - 1
|
newposition = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
a$ = idegetline$(idecy)
|
a$ = idegetline$(idecy)
|
||||||
IF newposition > LEN(a$) THEN idecx = newposition: GOTO DoneWholeWord
|
IF newposition > LEN(a$) THEN idecx = newposition: GOTO DoneWholeWord
|
||||||
IF newposition = 1 THEN ideselectx1 = 1: GOTO DoneWholeWord
|
IF newposition = 1 THEN ideselectx1 = 1: GOTO DoneWholeWord
|
||||||
|
@ -2659,11 +2667,11 @@ FUNCTION ide2 (ignore)
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF mCLICK THEN
|
IF mCLICK THEN
|
||||||
IF mX > 1 AND mX < idewx AND mY > 2 AND mY < (idewy - 5) THEN 'inside text box
|
IF mX > 1 + maxLineNumberLength AND mX < idewx AND mY > 2 AND mY < (idewy - 5) THEN 'inside text box
|
||||||
IF old.mX = mX AND old.mY = mY THEN
|
IF old.mX = mX AND old.mY = mY THEN
|
||||||
IF TIMER - last.TBclick# > .5 THEN GOTO regularTextBox_click
|
IF TIMER - last.TBclick# > .5 THEN GOTO regularTextBox_click
|
||||||
'Double-click on text box: attempt to select "word" clicked
|
'Double-click on text box: attempt to select "word" clicked
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN
|
IF idecy > iden THEN
|
||||||
GOTO regularTextBox_click
|
GOTO regularTextBox_click
|
||||||
|
@ -2754,13 +2762,33 @@ FUNCTION ide2 (ignore)
|
||||||
regularTextBox_click:
|
regularTextBox_click:
|
||||||
old.mX = mX: old.mY = mY: last.TBclick# = TIMER
|
old.mX = mX: old.mY = mY: last.TBclick# = TIMER
|
||||||
ideselect = 1
|
ideselect = 1
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
ideselect = 1: ideselectx1 = idecx: ideselecty1 = idecy
|
ideselect = 1
|
||||||
|
IF (NOT KSHIFT) THEN ideselectx1 = idecx: ideselecty1 = idecy
|
||||||
idemouseselect = 1
|
idemouseselect = 1
|
||||||
wholeword.select = 0
|
wholeword.select = 0
|
||||||
END IF
|
END IF
|
||||||
|
ELSEIF mX > 1 AND mx =< 1 + maxLineNumberLength AND mY > 2 AND mY < (idewy - 5) AND ShowLineNumbers THEN
|
||||||
|
'line numbers are visible and been clicked
|
||||||
|
ideselect = 1
|
||||||
|
idecy = mY - 2 + idesy - 1
|
||||||
|
IF idecy < iden THEN
|
||||||
|
IF (NOT KSHIFT) THEN ideselectx1 = 1: ideselecty1 = idecy
|
||||||
|
idecy = idecy + 1
|
||||||
|
idecx = 1
|
||||||
|
ELSEIF idecy = iden THEN
|
||||||
|
a$ = idegetline$(idecy)
|
||||||
|
IF (NOT KSHIFT) THEN ideselectx1 = 1: ideselecty1 = idecy
|
||||||
|
idecx = LEN(a$) + 1
|
||||||
|
ELSEIF idecy > iden THEN
|
||||||
|
idecy = iden
|
||||||
|
ideselect = 0
|
||||||
|
idecx = 1
|
||||||
|
END IF
|
||||||
|
wholeword.select = 0
|
||||||
|
idemouseselect = 0
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
@ -2768,9 +2796,9 @@ FUNCTION ide2 (ignore)
|
||||||
|
|
||||||
IF mCLICK2 THEN 'Second mouse button pressed.
|
IF mCLICK2 THEN 'Second mouse button pressed.
|
||||||
invokecontextualmenu:
|
invokecontextualmenu:
|
||||||
IF mX > 1 AND mX < idewx AND mY > 2 AND mY < (idewy - 5) THEN 'inside text box
|
IF mX > 1 + maxLineNumberLength AND mX < idewx AND mY > 2 AND mY < (idewy - 5) THEN 'inside text box
|
||||||
IF ideselect = 0 THEN 'Right click only positions the cursor if no selection is active
|
IF ideselect = 0 THEN 'Right click only positions the cursor if no selection is active
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
ELSE 'A selection is reported but it may be that the user only clicked the screen. Let's check:
|
ELSE 'A selection is reported but it may be that the user only clicked the screen. Let's check:
|
||||||
|
@ -2785,14 +2813,14 @@ FUNCTION ide2 (ignore)
|
||||||
IF a2$ = "" THEN
|
IF a2$ = "" THEN
|
||||||
'Told ya.
|
'Told ya.
|
||||||
ideselect = 0
|
ideselect = 0
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
ELSE
|
ELSE
|
||||||
'Ok, there is a selection. But we'll override it if the click was outside it
|
'Ok, there is a selection. But we'll override it if the click was outside it
|
||||||
IF mX - 1 + idesx - 1 < sx1 OR mX - 1 + idesx - 1 > sx2 THEN
|
IF (mX - 1 + idesx - 1) - maxLineNumberLength < sx1 OR (mX - 1 + idesx - 1) - maxLineNumberLength > sx2 THEN
|
||||||
ideselect = 0
|
ideselect = 0
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
ideshowtext
|
ideshowtext
|
||||||
|
@ -2800,7 +2828,7 @@ FUNCTION ide2 (ignore)
|
||||||
END IF
|
END IF
|
||||||
IF mY - 2 + idesy - 1 < idecy OR mY - 2 + idesy - 1 > idecy THEN
|
IF mY - 2 + idesy - 1 < idecy OR mY - 2 + idesy - 1 > idecy THEN
|
||||||
ideselect = 0
|
ideselect = 0
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
ideshowtext
|
ideshowtext
|
||||||
|
@ -2814,7 +2842,7 @@ FUNCTION ide2 (ignore)
|
||||||
IF sy1 > sy2 THEN SWAP sy1, sy2
|
IF sy1 > sy2 THEN SWAP sy1, sy2
|
||||||
IF mY - 2 + idesy - 1 < sy1 OR mY - 2 + idesy - 1 > sy2 THEN
|
IF mY - 2 + idesy - 1 < sy1 OR mY - 2 + idesy - 1 > sy2 THEN
|
||||||
ideselect = 0
|
ideselect = 0
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
ideshowtext
|
ideshowtext
|
||||||
|
@ -2924,9 +2952,10 @@ FUNCTION ide2 (ignore)
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF mB AND idemouseselect <= 1 THEN
|
IF mB AND idemouseselect <= 1 THEN
|
||||||
IF mX > 1 AND mX < idewx AND mY > 2 AND mY < idewy - 5 THEN 'inside text box
|
IF mX > 1 + maxLineNumberLength AND mX < idewx AND mY > 2 AND mY < idewy - 5 THEN 'inside text box
|
||||||
IF idemouseselect = 1 THEN
|
IF idemouseselect = 1 THEN
|
||||||
idecx = mX - 1 + idesx - 1
|
idecx = (mX - 1 + idesx - 1) - maxLineNumberLength
|
||||||
|
IF idecx < 1 THEN idecx = 1
|
||||||
idecy = mY - 2 + idesy - 1
|
idecy = mY - 2 + idesy - 1
|
||||||
IF idecy > iden THEN idecy = iden
|
IF idecy > iden THEN idecy = iden
|
||||||
END IF
|
END IF
|
||||||
|
@ -2934,13 +2963,13 @@ FUNCTION ide2 (ignore)
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF mB THEN
|
IF mB THEN
|
||||||
IF mX = 1 OR mX = idewx OR mY <= 2 OR mY >= idewy - 5 THEN 'off text window area
|
IF ((mX = 1 AND ShowLineNumbers = 0) OR (mX <= 1 + maxLineNumberLength AND ShowLineNumbers)) OR mX = idewx OR mY <= 2 OR mY >= idewy - 5 THEN 'off text window area
|
||||||
IF idemouseselect = 1 THEN
|
IF idemouseselect = 1 THEN
|
||||||
|
|
||||||
'scroll window
|
'scroll window
|
||||||
IF mY >= idewy - 5 THEN idecy = idecy + 1: IF idecy > iden THEN idecy = iden
|
IF mY >= idewy - 5 THEN idecy = idecy + 1: IF idecy > iden THEN idecy = iden
|
||||||
IF mY <= 2 THEN idecy = idecy - 1: IF idecy < 1 THEN idecy = 1
|
IF mY <= 2 THEN idecy = idecy - 1: IF idecy < 1 THEN idecy = 1
|
||||||
IF mX = 1 THEN idecx = idecx - 1: IF idecx < 1 THEN idecx = 1
|
IF ((mX = 1 AND ShowLineNumbers = 0) OR (mX <= 1 + maxLineNumberLength AND ShowLineNumbers)) THEN idecx = idecx - 1: IF idecx < 1 THEN idecx = 1
|
||||||
IF mX = idewx THEN idecx = idecx + 1
|
IF mX = idewx THEN idecx = idecx + 1
|
||||||
idewait
|
idewait
|
||||||
END IF
|
END IF
|
||||||
|
@ -4812,6 +4841,20 @@ FUNCTION ide2 (ignore)
|
||||||
GOTO ideloop
|
GOTO ideloop
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
IF RIGHT$(menu$(m, s), 13) = "#Line numbers" THEN
|
||||||
|
PCOPY 2, 0
|
||||||
|
ShowLineNumbers = NOT ShowLineNumbers
|
||||||
|
IF ShowLineNumbers THEN
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbers", "TRUE"
|
||||||
|
menu$(ViewMenuID, ViewMenuShowLineNumbers) = CHR$(7) + "#Line numbers"
|
||||||
|
ELSE
|
||||||
|
WriteConfigSetting "'[GENERAL SETTINGS]", "ShowLineNumbers", "FALSE"
|
||||||
|
menu$(ViewMenuID, ViewMenuShowLineNumbers) = "#Line numbers"
|
||||||
|
END IF
|
||||||
|
PCOPY 3, 0: SCREEN , , 3, 0: idewait4mous: idewait4alt
|
||||||
|
GOTO ideloop
|
||||||
|
END IF
|
||||||
|
|
||||||
IF menu$(m, s) = "#Find... Ctrl+F3" THEN
|
IF menu$(m, s) = "#Find... Ctrl+F3" THEN
|
||||||
PCOPY 2, 0
|
PCOPY 2, 0
|
||||||
idefindjmp:
|
idefindjmp:
|
||||||
|
@ -8148,7 +8191,7 @@ SUB ideshowtext
|
||||||
|
|
||||||
IF idecx < idesx THEN idesx = idecx
|
IF idecx < idesx THEN idesx = idecx
|
||||||
IF idecy < idesy THEN idesy = idecy
|
IF idecy < idesy THEN idesy = idecy
|
||||||
IF idecx - idesx >= (idewx - 2) THEN idesx = idecx - (idewx - 3)
|
IF (idecx + maxLineNumberLength) - idesx >= (idewx - 2) THEN idesx = (idecx + maxLineNumberLength) - (idewx - 3)
|
||||||
IF idecy - idesy >= (idewy - 8) THEN idesy = idecy - (idewy - 9)
|
IF idecy - idesy >= (idewy - 8) THEN idesy = idecy - (idewy - 9)
|
||||||
|
|
||||||
sy1 = ideselecty1
|
sy1 = ideselecty1
|
||||||
|
@ -8205,6 +8248,21 @@ SUB ideshowtext
|
||||||
LOCATE y + 3, 1
|
LOCATE y + 3, 1
|
||||||
COLOR 7, 1
|
COLOR 7, 1
|
||||||
PRINT CHR$(179); 'clear prev bookmarks from lhs
|
PRINT CHR$(179); 'clear prev bookmarks from lhs
|
||||||
|
|
||||||
|
IF ShowLineNumbers THEN
|
||||||
|
IF ShowLineNumbersUseBG THEN COLOR , 6
|
||||||
|
PRINT SPACE$(maxLineNumberLength);
|
||||||
|
IF l <= iden THEN
|
||||||
|
l2$ = STR$(l)
|
||||||
|
IF POS(1) - (LEN(l2$) + 1) >= 2 THEN
|
||||||
|
LOCATE y + 3, POS(1) - (LEN(l2$) + 1)
|
||||||
|
PRINT l2$;
|
||||||
|
END IF
|
||||||
|
END IF
|
||||||
|
IF ShowLineNumbersSeparator THEN LOCATE y + 3, 1 + maxLineNumberLength: PRINT CHR$(179);
|
||||||
|
COLOR , 1
|
||||||
|
END IF
|
||||||
|
|
||||||
IF l = idefocusline AND idecy <> l THEN
|
IF l = idefocusline AND idecy <> l THEN
|
||||||
COLOR 7, 4 'Line with error gets a red background
|
COLOR 7, 4 'Line with error gets a red background
|
||||||
ELSEIF idecy = l OR (l >= idecy_multilinestart AND l <= idecy_multilineend) THEN
|
ELSEIF idecy = l OR (l >= idecy_multilinestart AND l <= idecy_multilineend) THEN
|
||||||
|
@ -8218,7 +8276,7 @@ SUB ideshowtext
|
||||||
link_idecx = 0
|
link_idecx = 0
|
||||||
rgb_idecx = 0
|
rgb_idecx = 0
|
||||||
IF l = idecy THEN
|
IF l = idecy THEN
|
||||||
IF idecx <= LEN(a$) THEN
|
IF idecx <= LEN(a$) AND idecx >= 1 THEN
|
||||||
cc = ASC(a$, idecx)
|
cc = ASC(a$, idecx)
|
||||||
IF cc = 32 THEN
|
IF cc = 32 THEN
|
||||||
IF LTRIM$(LEFT$(a$, idecx)) = "" THEN cc = -1
|
IF LTRIM$(LEFT$(a$, idecx)) = "" THEN cc = -1
|
||||||
|
@ -8339,7 +8397,6 @@ SUB ideshowtext
|
||||||
|
|
||||||
a2$ = SPACE$(idesx + (idewx - 3))
|
a2$ = SPACE$(idesx + (idewx - 3))
|
||||||
MID$(a2$, 1) = a$
|
MID$(a2$, 1) = a$
|
||||||
'a2$ = RIGHT$(a2$, (idewx - 2))
|
|
||||||
ELSE
|
ELSE
|
||||||
a2$ = SPACE$((idewx - 2))
|
a2$ = SPACE$((idewx - 2))
|
||||||
END IF
|
END IF
|
||||||
|
@ -8525,9 +8582,16 @@ SUB ideshowtext
|
||||||
LOOP ' verifying the code and growing the array during the IDE passes.
|
LOOP ' verifying the code and growing the array during the IDE passes.
|
||||||
IF InValidLine(l) AND 1 THEN COLOR 7
|
IF InValidLine(l) AND 1 THEN COLOR 7
|
||||||
|
|
||||||
IF 2 + m - idesx >= 2 AND 2 + m - idesx < idewx THEN
|
IF ShowLineNumbers THEN
|
||||||
LOCATE y + 3, 2 + m - idesx
|
IF (2 + m - idesx) + maxLineNumberLength >= 2 + maxLineNumberLength AND (2 + m - idesx) + maxLineNumberLength < idewx THEN
|
||||||
PRINT thisChar$;
|
LOCATE y + 3, (2 + m - idesx) + maxLineNumberLength
|
||||||
|
PRINT thisChar$;
|
||||||
|
END IF
|
||||||
|
ELSE
|
||||||
|
IF 2 + m - idesx >= 2 AND 2 + m - idesx < idewx THEN
|
||||||
|
LOCATE y + 3, 2 + m - idesx
|
||||||
|
PRINT thisChar$;
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
'Restore BG color in case a matching bracket was printed with different BG
|
'Restore BG color in case a matching bracket was printed with different BG
|
||||||
|
@ -8542,7 +8606,7 @@ SUB ideshowtext
|
||||||
IF sy1 = sy2 THEN 'single line select
|
IF sy1 = sy2 THEN 'single line select
|
||||||
COLOR 1, 7
|
COLOR 1, 7
|
||||||
x2 = idesx
|
x2 = idesx
|
||||||
FOR x = 2 TO (idewx - 2)
|
FOR x = 2 + maxLineNumberLength TO (idewx - 2)
|
||||||
IF x2 >= sx1 AND x2 < sx2 THEN
|
IF x2 >= sx1 AND x2 < sx2 THEN
|
||||||
a = SCREEN(y + 3, x)
|
a = SCREEN(y + 3, x)
|
||||||
|
|
||||||
|
@ -8566,10 +8630,10 @@ SUB ideshowtext
|
||||||
COLOR 7, 1
|
COLOR 7, 1
|
||||||
ELSE 'multiline select
|
ELSE 'multiline select
|
||||||
IF idecx = 1 AND l = sy2 AND idecy > sy1 THEN GOTO nofinalselect
|
IF idecx = 1 AND l = sy2 AND idecy > sy1 THEN GOTO nofinalselect
|
||||||
LOCATE y + 3, 2
|
LOCATE y + 3, 2 + maxLineNumberLength
|
||||||
COLOR 1, 7
|
COLOR 1, 7
|
||||||
|
|
||||||
FOR x = idesx TO idesx + idewx - 2
|
FOR x = idesx TO idesx + idewx - (2 + maxLineNumberLength)
|
||||||
PRINT MID$(a2$, x, 1);
|
PRINT MID$(a2$, x, 1);
|
||||||
NEXT
|
NEXT
|
||||||
|
|
||||||
|
@ -8606,7 +8670,7 @@ SUB ideshowtext
|
||||||
LOCATE idewy + idesubwindow, (idewx - 10) - LEN(a$)
|
LOCATE idewy + idesubwindow, (idewx - 10) - LEN(a$)
|
||||||
PRINT a$;
|
PRINT a$;
|
||||||
|
|
||||||
SCREEN , , 0, 0: LOCATE idecy - idesy + 3, idecx - idesx + 2: SCREEN , , 3, 0
|
SCREEN , , 0, 0: LOCATE idecy - idesy + 3, maxLineNumberLength + idecx - idesx + 2: SCREEN , , 3, 0
|
||||||
|
|
||||||
EXIT SUB
|
EXIT SUB
|
||||||
FindQuoteComment:
|
FindQuoteComment:
|
||||||
|
@ -13552,7 +13616,7 @@ SUB IdeMakeContextualMenu
|
||||||
a$ = idegetline(idecy)
|
a$ = idegetline(idecy)
|
||||||
a2$ = ""
|
a2$ = ""
|
||||||
x = idecx
|
x = idecx
|
||||||
IF x <= LEN(a$) THEN
|
IF x <= LEN(a$) AND x >= 1 THEN
|
||||||
IF alphanumeric(ASC(a$, x)) THEN
|
IF alphanumeric(ASC(a$, x)) THEN
|
||||||
x1 = x
|
x1 = x
|
||||||
DO WHILE x1 > 1
|
DO WHILE x1 > 1
|
||||||
|
|
Loading…
Reference in a new issue