EmEditor (text editor) Forum Index
   Enhancement Suggestions about Macros
     [feature request] need to get last searched string
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
hihihlo
Posted on: 7/12/2012 12:42 am
Just popping in
Joined: 6/9/2011
From:
Posts: 11
[feature request] need to get last searched string
for example,
I search string "func2", when found "func2(aa, bb, cc, dd)" and cursor in "bb",
I can invoke below simple macro to select "(aa, bb, cc, dd)" :

if (document.selection.Find("[])}]", eeFindReplaceRegExp | eeFindNext)) {
document.selection.CharRight(false);
document.selection.GoToBrace(true);
}


and I can invoke below simple macro to select "aa, bb, cc, dd" :

if (document.selection.Find("[])}]", eeFindReplaceRegExp | eeFindNext)) {
document.selection.CharLeft(false);
document.selection.GoToBrace(true);
}

and so on ...,
But those macro highlight characters ], ), }
AND INTERRUPT search string "func2" !!!
So I can't press F3 to find next "func2" !

Solve 1:
If emeditor provide function GetLastSearchedString(),
then I can recover search string "func2" in those macro,
and emeditor still Highlight "func2" rather than ], ), } !!

Solve 2:
Or add a flag to param "nFlags" of document.selection.Find(),
which flag let Find() NOT select found string (just move cursor), and eeFindNext/eeFindPrevious still find "func2" rather than "[])}]" !

Could you add the function or flag, please ?
Thanks !
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文