Select the closest outline item when the outline view's query is empty
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
2660d37ad8
commit
055d48cfb2
3 changed files with 43 additions and 7 deletions
|
@ -1917,7 +1917,11 @@ impl BufferSnapshot {
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Some(Outline::new(items))
|
||||
if items.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(Outline::new(items))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn enclosing_bracket_ranges<T: ToOffset>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue