mirror of
https://github.com/atom/atom.git
synced 2026-02-12 07:35:14 -05:00
Allow a node matching function in bufferRangeForScopeAtPosition
This commit is contained in:
@@ -22,6 +22,7 @@ const always = scope => true
|
||||
// true iff the scope matches the selector.
|
||||
function matcherForSelector (selector) {
|
||||
const parts = parse(selector)
|
||||
if (typeof parts === 'function') return parts
|
||||
return selector
|
||||
? scope => isSubset(parts, parse(scope))
|
||||
: always
|
||||
|
||||
Reference in New Issue
Block a user