mirror of
https://github.com/wting/autojump
synced 2026-03-02 03:49:26 +00:00
handle no results situation
This commit is contained in:
@@ -212,7 +212,8 @@ def find_matches(config, needles, count=1):
|
|||||||
exact_matches = match_regex(needles, data, ignore_case)
|
exact_matches = match_regex(needles, data, ignore_case)
|
||||||
|
|
||||||
exists = lambda entry: os.path.exists(entry.path)
|
exists = lambda entry: os.path.exists(entry.path)
|
||||||
return first(ifilter(exists, exact_matches)).path
|
result = first(ifilter(exists, exact_matches))
|
||||||
|
return result.path if result else u''
|
||||||
|
|
||||||
|
|
||||||
def match_end(needle, haystack, ignore_case=False):
|
def match_end(needle, haystack, ignore_case=False):
|
||||||
|
|||||||
Reference in New Issue
Block a user