Ticket #4429 (closed defect: fixed)

Opened 22 months ago

Last modified 22 months ago

4.8.29: editor serch/replace regex no longer working

Reported by: kloczek Owned by: andrew_b
Priority: major Milestone: 4.8.29
Component: mc-search Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by andrew_b) (diff)

Sample text

FAILED tests/test_syntax.py::test_python_render_simple_indent_guides - assert '\x1b[34mdef\...vious_value\n' == '\x1b[34mdef\...vious_value\n'
FAILED tests/test_syntax.py::test_python_render_line_range_indent_guides - assert '\x1b[2;37m│ ...[0m(values)\n' == '\x1b[2m│   \...[0m(values)\n'

Two S/R

search:

 - .*

Repace:

 \\\n

Is causing that in first line is replaced everytjig to the end of file. In 4.8.28 it was working on single line.

Second S/R:

search:

^ERROR|^FAILED

Repace:

\t--deselect

result: Search string not found

Change History

comment:1 Changed 22 months ago by andrew_b

Please apply WikiFormatting.

comment:2 Changed 22 months ago by andrew_b

  • Component changed from mcedit to mc-search
  • Description modified (diff)

comment:3 Changed 22 months ago by andrew_b

These are results of multi-line search implementation: #400.

Can't say that 1st case is a bug. Regexp .* means "any number of any characters" and "any symbols" include \n. Therefore search result includes everything up to EOF.

Workaround is

  - [^\n]*

Probably we should have two modes of search: single-line and multi-line.

2nd case is a bug, definitely.

Simplified testcase:

<an empty line, cursor is here>
aa
bb

Search

^a|^b
Last edited 22 months ago by andrew_b (previous) (diff)

comment:4 Changed 22 months ago by andrew_b

Résumé: for 4.8.29, revert multi-line search [e370818c09bbbb2e2bd445969d57e48ce7b76a05].

comment:5 Changed 22 months ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted

comment:6 Changed 22 months ago by andrew_b

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:7 Changed 22 months ago by andrew_b

  • Status changed from testing to closed

comment:8 Changed 22 months ago by kloczek

BTW. IMO it wold be really good to move BTS to githu.
It wook me more than 2 min to submit that ticket :/
As well this frontend does not provide easy way to check such commits because it does not generates links refferences lik github/gitlab provides.

Really .. please make this Trac R/O, enable issue tracker in githb repo and send publicly message that from now github issue tracker should be used.

comment:9 Changed 22 months ago by zaytsev

Really .. please make this Trac R/O, enable issue tracker in githb repo and send publicly message that from now github issue tracker should be used.

Really, it would be nice if you finally stop telling others unrequested what, when and how to do.

Note: See TracTickets for help on using tickets.