Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.8.29: editor serch/replace regex no longer working #4429

Closed
mc-butler opened this issue Jan 15, 2023 · 9 comments
Closed

4.8.29: editor serch/replace regex no longer working #4429

mc-butler opened this issue Jan 15, 2023 · 9 comments
Assignees
Labels
area: search Search subsystem prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/4429
Reporter kloczek (kloczko.tomasz@….com)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 7:54 UTC (comment 1)

Please apply WikiFormatting.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 9:30 UTC (comment 2)

  • Component changed from mcedit to mc-search
  • Description edited

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 9:42 UTC (comment 3)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 9:57 UTC (comment 4)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 13:12 UTC (comment 5)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 13:13 UTC (comment 6)

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

[a4d254c]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 15, 2023 at 13:14 UTC (comment 7)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by kloczek (kloczko.tomasz@….com) on Jan 15, 2023 at 17:02 UTC (comment 8)

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.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jan 15, 2023 at 17:30 UTC (comment 9)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: search Search subsystem prio: medium Has the potential to affect progress
Development

No branches or pull requests

2 participants