1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-05 01:50:25 +00:00

Visually indicates the line where the search term was found.

In normal operation, the line already gets highlighted. This commit makes the search result more visible/easily spotted when repeating search with F3 or when the search bar has focus.
This commit is contained in:
FellippeHeitor 2021-07-22 11:40:03 -03:00
parent 4efd95201d
commit 84fb639626
2 changed files with 6 additions and 1 deletions

View file

@ -168,7 +168,7 @@ DIM SHARED EnteringRGB AS _BYTE
DIM SHARED ActiveINCLUDELink AS LONG
DIM SHARED ActiveINCLUDELinkFile AS STRING
DIM SHARED HideCurrentLineHighlight AS _BYTE, ShowLineNumbers AS _BYTE
DIM SHARED SearchMenuEnableQuickNav AS INTEGER
DIM SHARED SearchMenuEnableQuickNav AS INTEGER, searchStringFoundOn AS LONG
DIM SHARED idegotobox_LastLineNum AS LONG, maxLineNumberLength AS LONG
DIM SHARED versionStringStatus$, lineNumberStatus$

View file

@ -8254,6 +8254,7 @@ SUB idefindagain (showFlags AS _BYTE)
IF x THEN
ideselect = 1
idecx = x: idecy = y
searchStringFoundOn = idecy
ideselectx1 = x + LEN(s$): ideselecty1 = y
IF idefindinvert THEN
@ -9773,6 +9774,10 @@ SUB ideshowtext
IF ShowLineNumbers THEN
IF ShowLineNumbersUseBG THEN COLOR , 6
IF searchStringFoundOn > 0 AND searchStringFoundOn = l THEN
COLOR 13, 5
searchStringFoundOn = 0
END IF
IF vWatchOn = 1 AND IdeBreakpoints(l) <> 0 THEN COLOR , 4
IF vWatchOn = 1 AND IdeSkipLines(l) <> 0 THEN COLOR 14
_PRINTSTRING (2, y + 3), SPACE$(maxLineNumberLength)