Re: [code] [textadept] Search wrapped behaviour

From: Robert Gieseke <>
Date: Wed, 26 Mar 2014 15:28:49 +0100

Am 26/03/14 14:15, schrieb Mitchell:
> On Wed, 26 Mar 2014, Robert Gieseke wrote:
>> the find_wrapped event seems to be always emitted at the top of the
>> buffer and not before the first occurrence of the searched term, where
>> the search was initiated.
>> Is this the expected behaviour?
>> This discussion seems to disagree:
> Yes, it is expected behavior. My understanding of "wrap around" is when
> you hit the bottom of the buffer and jump to the top to continue the
> search.

Thanks for the clarification. How about changing the doc string to
something like

-- @field (string)
-- Emitted when a text search passes the beginning of a buffer, either
-- bottom to top (when searching for a next occurrence), or from top to
-- bottom (when searching for a previous occurrence).
-- This is useful for implementing a more visual or audible notice when a
-- search wraps in addition to the statusbar message.

I never really noticed this behaviour, only when I used something more
visible like

events.connect(events.FIND_WRAPPED, function()
   ui.dialogs.msgbox{title='Search wrapped', text='Search wrapped'}


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 26 Mar 2014 - 10:28:49 EDT

This archive was generated by hypermail 2.2.0 : Thu 27 Mar 2014 - 06:54:28 EDT