mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 12:40:36 +00:00
Update ide_methods.bas
This commit is contained in:
parent
bd3b673996
commit
459c8a216d
|
@ -17668,23 +17668,11 @@ FUNCTION idesearchedbox$
|
|||
|
||||
ln = 0
|
||||
l$ = ""
|
||||
fh = FREEFILE
|
||||
OPEN ".\internal\temp\searched.bin" FOR BINARY AS #fh: a$ = SPACE$(LOF(fh)): GET #fh, , a$
|
||||
a$ = RIGHT$(a$, LEN(a$) - 2)
|
||||
DO WHILE LEN(a$)
|
||||
ai = INSTR(a$, CRLF)
|
||||
IF ai THEN
|
||||
f$ = LEFT$(a$, ai - 1): IF ai = LEN(a$) - 1 THEN a$ = "" ELSE a$ = RIGHT$(a$, LEN(a$) - ai - 3)
|
||||
IF LEN(l$) THEN l$ = l$ + sep + f$ ELSE l$ = f$
|
||||
ln = ln + 1
|
||||
END IF
|
||||
LOOP
|
||||
CLOSE #fh
|
||||
|
||||
IF ln = 0 THEN
|
||||
l$ = sep
|
||||
END IF
|
||||
|
||||
REDIM SearchHistory(0) AS STRING
|
||||
RetrieveSearchHistory SearchHistory()
|
||||
FOR i = 1 to UBOUND(SearchHistory)
|
||||
l$ = SearchHistory(i) + sep + l$
|
||||
NEXT
|
||||
'72,19
|
||||
|
||||
h = idewy + idesubwindow - 9
|
||||
|
@ -18600,7 +18588,7 @@ FUNCTION removeDoubleSlashes$(f$)
|
|||
END FUNCTION
|
||||
|
||||
SUB IdeAddSearched (s2$)
|
||||
s$ = s2$ + CHR$(10)
|
||||
s$ = s2$ + CRLF
|
||||
fh = FREEFILE
|
||||
OPEN ".\internal\temp\searched.bin" FOR BINARY AS #fh: a$ = SPACE$(LOF(fh)): GET #fh, , a$
|
||||
x = INSTR(UCASE$(a$), UCASE$(s$))
|
||||
|
@ -19986,13 +19974,18 @@ END FUNCTION
|
|||
SUB RetrieveSearchHistory (SearchHistory() as string)
|
||||
fh = FREEFILE
|
||||
OPEN ".\internal\temp\searched.bin" FOR BINARY AS #fh
|
||||
redim _preserve SearchHistory(1 to 10000) 'large initial array to hold the data
|
||||
Do until eof(fh)
|
||||
ln = ln + 1
|
||||
if ln > ubound(SearchHistory) then redim _preserve SearhHistory(1 to ln + 10000) 'large resize, it necessary
|
||||
line input #fh, SearchHistory(ln)
|
||||
Loop
|
||||
redim _preserve SearchHistory(1 to ln) 'resize to proper size before exit
|
||||
redim _preserve SearchHistory(1 to 10000) AS STRING 'large initial array to hold the data
|
||||
IF LOF(FH) THEN
|
||||
Do until eof(fh)
|
||||
ln = ln + 1
|
||||
if ln > ubound(SearchHistory) then redim _preserve SearhHistory(1 to ln + 10000) AS STRING 'large resize, it necessary
|
||||
line input #fh, SearchHistory(ln)
|
||||
Loop
|
||||
redim _preserve SearchHistory(1 to ln) AS STRING'resize to proper size before exit
|
||||
ELSE
|
||||
REDIM SearchHistory(1) AS STRING
|
||||
SearchHistory(1) = ""
|
||||
END IF
|
||||
CLOSE #fh
|
||||
end sub
|
||||
|
||||
|
|
Loading…
Reference in a new issue