Re: [code] [textadept] Regex search result is not always selected

From: David Reimer <djreimer.att.gmail.com>
Date: Mon, 29 May 2017 08:38:21 +0100

On 29 May 2017 at 05:00, <code+help.att.foicica.com> wrote:
> Topics (messages 3915 through 3926):
> [code] [textadept] Regex search result is not always selected
> 3925 - Daniel <quuuux.att.gmail.com>
>
> From: Daniel <quuuux.att.gmail.com>
> To: code.att.foicica.com
> Cc:
> Bcc:
> Date: Sun, 28 May 2017 20:02:35 +0200
> Subject: [code] [textadept] Regex search result is not always selected
> Hi,
>
> according to the API docs buffer.search_next() and buffer.search_prev() should result in the matching text being selected. On my Textadept 9.4 installation this works correctly in the following scenarios:
>
> * Find next without regex
> * Find prev without regex
> * Find next with regex
>
> When using "Find prev with regex" the matching text is found correctly, however it is not selected if the regex contains a repeat-operator.
>
> To reproduce perform a regex search for "^.*:$" on the following document:
>
> --------
> foo:
> bar:
> baz:
> --------
>
> Repeatedly executing "Find next" iterates through all 3 lines with each being selected correctly. "Find prev" iterates through all 3 lines as well but only selects the colon.
>
> Best
> Daniel

I can confirm this behaviour also on my 9.3 (need to update!)
Textadept running under Ubuntu 16.04 LTS. However, if you alter the
conditions slightly to this content:

```
foo:
bar:
baz:
foo:
bar:
```

And then use as regex `^b.*:$`, the both "Find Next" and "Find Prev"
work properly. The whole of both "bar:" and "baz:" is found (all
instances) *and* selected.

FWIW!

David

-- 
David Reimer
Edinburgh, UK
djreimer.att.gmail.com
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 29 May 2017 - 03:38:21 EDT

This archive was generated by hypermail 2.2.0 : Mon 29 May 2017 - 06:53:35 EDT