diff options
author | Andrew Gallant <jamslam@gmail.com> | 2021-05-30 21:36:35 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2021-05-31 21:51:18 -0400 |
commit | fc31aedcf3cae7a773c94a79775396759af10dd8 (patch) | |
tree | 71627aaa0397f1165e2ce214745df6dda2f99ce0 /CHANGELOG.md | |
parent | 578e1992fa21d3612d3e613d8869dbbb16e33cbe (diff) |
printer: vimgrep now only prints one line
It turns out that the vimgrep format really only wants one line per
match, even when that match spans multiple lines.
We continue to support the previous behavior (print all lines in a
match) in the `grep-printer` crate. We add a new option to enable the
"only print the first line" behavior, and unconditionally enable it in
ripgrep. We can do that because the option has no effect in single-line
mode, since, well, in that case matches are guaranteed to span one line
anyway.
Fixes #1866
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f9a0992..3d147752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Unreleased changes. Release notes have not yet been written. **BREAKING CHANGES**: +**Binary detection output has changed slightly.** + In this release, a small tweak has been made to the output format when a binary file is detected. Previously, it looked like this: @@ -17,6 +19,13 @@ Now it looks like this: FOO: binary file matches (found "\0" byte around offset XXX) ``` +**vimgrep output in multi-line now only prints the first line for each match.** + +See [issue 1866](https://github.com/BurntSushi/ripgrep/issues/1866) for more +discussion on this. Previously, every line in a match was duplicated, even +when it spanned multiple lines. There are no changes to vimgrep output when +multi-line mode is disabled. + Security fixes: * [CVE-2021-3013](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3013): |