Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Searches using regular expressions and look ahead/behind do not update correctly #1148

@torik42

Description

@torik42

Prerequisites

Description

The results of find-and-replace usually update when the file is changed. However, this does not work as expected when using regular expressions with look-ahead/-behind.

Steps to Reproduce

  1. Open a file.
  2. Add some text, e.g. bdb ada adb ada adb.
  3. Open find and replace and search using regex with look ahead and look behind, e.g. (?<=a)d(?=a) to find the character d surrounded by as.
  4. Change parts of the string which contain the match, in this example remove some of the ds or change the surrounding such that it is not matched any more.

Expected behavior:

During editing, the matches should update automatically and correctly.

Actual behavior:

During editing, the matches do not update correctly. Here is an example:

example.mov

Reproduces how often:

Always, but with different behaviour.

Versions

macOS Catalina 10.15.7

Atom : 1.55.0
Electron: 6.1.12
Chrome : 76.0.3809.146
Node : 12.4.0

apm 2.5.2
npm 6.14.8
node 12.4.0 x64
atom 1.55.0
python 3.8.6
git 2.24.3

Additional Information

Even, if one clicks search again, it does not update correctly. But if one changes the search term, e.g. remove the last ) and add it back, then it finds the occurrences correctly again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions