vim: Implement /n and /c in :s (#34102)

Closes #23345

Release Notes:

- vim: Support /n and /c in :s//
This commit is contained in:
Conrad Irwin 2025-07-09 00:14:04 -06:00 committed by GitHub
parent 6daf888fdb
commit 4ed206b37c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 263 additions and 81 deletions

View file

@ -404,6 +404,9 @@ impl SearchQuery {
let start = line_offset + mat.start();
let end = line_offset + mat.end();
matches.push(start..end);
if self.one_match_per_line() == Some(true) {
break;
}
}
line_offset += line.len() + 1;