mirror of
https://github.com/janet-lang/janet
synced 2025-02-27 05:10:03 +00:00
parent
9d8af7355f
commit
772916593b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user