multi_buffer: Merge adjacent matches into a single excerpt when separated by only one line (#31708)
Closes #31252 Release Notes: - Improved displaying of project search matches or diagnostics when the excerpts are adjacent. --------- Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
1 parent
632dfeda00
commit
c3a94fc656
2 files changed
+3
-3
No files matched your search
@@ -1690,7 +1690,9 @@ impl MultiBuffer {
|
||||
last_range.context.start <= range.context.start,
|
||||
"Last range: {last_range:?} Range: {range:?}"
|
||||
);
|
||||
if last_range.context.end >= range.context.start {
|
||||
if last_range.context.end >= range.context.start
|
||||
|| last_range.context.end.row + 1 == range.context.start.row
|
||||
{
|
||||
last_range.context.end = range.context.end.max(last_range.context.end);
|
||||
*counts.last_mut().unwrap() += 1;
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user