summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-10 06:27:29 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-10 06:27:29 -0700
commitee3ed33801eeb1472ea54051a8fa59653a11baae (patch)
treeb9ef9a1d2c0b82da633486c3a9924ffd7e37d072 /parser.c
parentd6ad5b6d3c5102dc7837bae1ae8f5528fa7b68b6 (diff)
downloadtxr-ee3ed33801eeb1472ea54051a8fa59653a11baae.tar.gz
txr-ee3ed33801eeb1472ea54051a8fa59653a11baae.tar.bz2
txr-ee3ed33801eeb1472ea54051a8fa59653a11baae.zip
No completion on symbol in nonexistent package.
* parser.c (provide_completions): If find_package returns nil, then just bail with no completions.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index 96ff786c..a958104f 100644
--- a/parser.c
+++ b/parser.c
@@ -465,6 +465,8 @@ static void provide_completions(const char *data,
{
val package_name = string_utf8(pkg_copy);
package = find_package(package_name);
+ if (!package)
+ return;
}
end = pkg;