Address
Pressing tab only does one thing at a time.
@@ -440,7 +440,6 @@ static void check_specials(JanetByteView src) {
check_cmatch(src, "while");
}
-/* TODO - check against special forms and print in alphabetical order */
static void kshowcomp(void) {
JanetTable *env = gbl_complete_env;
if (env == NULL) {
@@ -449,6 +448,10 @@ static void kshowcomp(void) {
return;
}
+ /* Advance while on symbol char */
+ while (is_symbol_char_gen(gbl_buf[gbl_pos]))
+ gbl_pos++;
+
JanetByteView prefix = get_symprefix();
if (prefix.len == 0) return;
@@ -471,6 +474,8 @@ static void kshowcomp(void) {
insert(lcp.bytes[i], 0);
}
+ if (prefix.len != lcp.len) return;
+
int32_t maxlen = 0;
for (int i = 0; i < gbl_match_count; i++)
if (gbl_matches[i].len > maxlen)
