Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 652145c

Browse files
committed
[[ FindSelected ]] Find selected text with interactive find
This patch changes the interactive find feature of the script editor to default to initializing the find text with the selected text if it is not empty. If empty it will use the current behavior of initializing to the previous search term.
1 parent 1d4ab86 commit 652145c

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Toolset/palettes/script editor/behaviors/revseinteractivefindbehavior.livecodescript

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ command openControl
77
# OK-2009-03-10 : Bug 7070 - The match case check box should take the current preference value.
88
set the hilite of button "Case" of me to (sePrefGet("find,casesensitive") is true)
99

10-
local tLastSearch
11-
put line 1 of seFindHistoryGet("find") into tLastSearch
12-
if tLastSearch is not empty then
13-
put tLastSearch into field "Find" of me
10+
local tSearch
11+
put the selectedText of field "Script" into tSearch
12+
if tSearch is empty then
13+
put line 1 of seFindHistoryGet("find") into tSearch
14+
end if
15+
16+
if tSearch is not empty then
17+
put tSearch into field "Find" of me
1418
else
1519
put empty into field "Find" of me
1620
end if

0 commit comments

Comments
 (0)