mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 05:27:07 +04:00
Refactor textobject node capture (#2741)
This commit is contained in:
parent
9b9c3e5ae2
commit
0b8a00ac96
@ -308,13 +308,7 @@ pub fn capture_nodes_any<'a>(
|
||||
let nodes: Vec<_> = mat
|
||||
.captures
|
||||
.iter()
|
||||
.filter_map(|x| {
|
||||
if x.index == capture_idx {
|
||||
Some(x.node)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.filter_map(|cap| (cap.index == capture_idx).then(|| cap.node))
|
||||
.collect();
|
||||
|
||||
if nodes.len() > 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user