From a89f1a28241c3807694b82ed0ddade89926d7340 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sat, 11 Aug 2018 20:39:40 -0700 Subject: [PATCH] Handle empty method list --- src/InteractiveCodeSearch.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/InteractiveCodeSearch.jl b/src/InteractiveCodeSearch.jl index d87777b..57c8ca0 100644 --- a/src/InteractiveCodeSearch.jl +++ b/src/InteractiveCodeSearch.jl @@ -140,6 +140,10 @@ end run_matcher(input) = String(read_stdout(CONFIG.interactive_matcher, input)) function choose_method(methods) + if isempty(methods) + @info "No (interesting) method found" + return + end if CONFIG.auto_open && length(methods) == 1 m = first(methods) loc = (string(m.file), m.line)