1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-26 07:03:16 +00:00

Clear completion list if fully complete.

This commit is contained in:
Calvin Rose 2020-01-19 11:31:42 -06:00
parent f74e19e673
commit f18c3323ea

View File

@ -523,7 +523,7 @@ static void kshowcomp(void) {
insert(lcp.bytes[i], 0);
}
if (prefix.len != lcp.len) return;
if (!gbl_lines_below && prefix.len != lcp.len) return;
int32_t maxlen = 0;
for (int i = 0; i < gbl_match_count; i++)
@ -531,10 +531,10 @@ static void kshowcomp(void) {
maxlen = gbl_matches[i].len;
int num_cols = getcols();
clearlines();
if (gbl_match_count >= 2) {
/* Second pass, print */
clearlines();
int col_width = maxlen + 4;
int cols = num_cols / col_width;
if (cols == 0) cols = 1;