Re: Search in selection?

22 views
Skip to first unread message

Philippe Lhoste

unread,
May 15, 2013, 6:42:07 AM5/15/13
to scite-i...@googlegroups.com
On 15/05/2013 00:01, tetsuo wrote:
> Hello. I would like to be pointed to a Lua script to make a "search in selection". That
> functionality is present in the "Replace" function, but it only works for replacing. I
> would like to find stuff in a selection and wrap around the search while in it.

What this script would do?
In standard search, the found string is selected, so it would lost the current selection
and you would no be able to search further, unless the script saves the information (line
range?) somewhere.

--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --

Pablo Baena

unread,
May 15, 2013, 9:19:10 AM5/15/13
to scite-i...@googlegroups.com
Yes, I even tried to write some script to do it by using StripShow but lacking static variables to store the selection is a problem, since setting CurrentPos or using GotoPos clear the selection.





--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scite-interest+unsubscribe@googlegroups.com.
To post to this group, send email to scite-interest@googlegroups.com.
Visit this group at http://groups.google.com/group/scite-interest?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Philippe Lhoste

unread,
May 16, 2013, 4:16:09 AM5/16/13
to scite-i...@googlegroups.com
On 15/05/2013 15:19, Pablo Baena wrote:
> Yes, I even tried to write some script to do it by using StripShow but lacking static
> variables to store the selection is a problem, since setting CurrentPos or using GotoPos
> clear the selection.

You can create new properties in Lua:

props['LuaInfoMessage'] = message

I use the above to create a custom property to display in the status bar, for example...

statusbar.text.1=\
Various things and \
$(LuaInfoMessage)
Reply all
Reply to author
Forward
0 new messages