mirror of
https://github.com/adobe/brackets.git
synced 2024-11-20 18:02:54 +01:00
ea96acefdf
of files) - /^/ is a pathological regexp that returns 0-length matches, so FindInFiles._getSearchMatches() was going into an infinite loop (saved from freezing only by the 100K match limit). This fixes Find/Replace in Files to return the correct results: an insertion point at the start of every line in the file. Single-file Find/Replace is inconsistent with this because it uses CM searchcursor instead of _getSearchMatches(). But it already does avoid an infinite loop: searchcursor forces the match to be length 1, except on empty lines (see the line.length check before matchLen is set to 1, which means it's left at 0 and CM returns no match for that line). So for single-file search, the result set is the 1st char of every non-empty line. Adds unit tests for both multi-file & single-file cases (also corrects an older FindReplace regexp test that was broken). |
||
---|---|---|
.. | ||
changed-file | ||
regexp-case-insensitive | ||
regexp-case-sensitive | ||
regexp-dollar-replace | ||
regexp-replace-multiline | ||
regexp-replace-multiline-partial | ||
regexp-zero-length | ||
simple-case-insensitive | ||
simple-case-insensitive-except-foo.css | ||
simple-case-insensitive-large | ||
simple-case-insensitive-modified | ||
simple-case-insensitive-only-foo.css | ||
simple-case-insensitive-unchecked | ||
simple-case-sensitive | ||
unchanged |