zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.24k stars 3.09k forks source link

Merged Selections When Searching for Consecutive Items [Option to disable merge?] #17910

Open selfish opened 2 months ago

selfish commented 2 months ago

Check for existing issues

Describe the feature

Issue: Merged Selections When Searching for Consecutive Items

Steps to Reproduce:

  1. Open a document with the following content:
CATEGORY1\nitem1\nitem2\n\n\nCATEGORY2\nitem1
  1. Press Cmd+F and search for \n.
  2. Click "Select All" for all matches.
  3. Press Enter/Return.

Actual Result:

The consecutive \n\n\n sequence is treated as a single selection, so the result is:

CATEGORY1
item1
item2
CATEGORY2
item1

Expected Result:

Each \n should be treated as a separate match. The expected output after the described flow should be:

CATEGORY1
item1
item2

CATEGORY2
item1

When replacing matches, I would expect individual occurrences, even when consecutive, to be selected as separate instances. This would prevent unintended merging when performing replacements.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

JosephTLyons commented 1 month ago

Here are issues that are related, but not quite the same. Grouping them to keep the ideas together.