Skip to content

Commit

Permalink
Always use current token level for tokenizing and completion.
Browse files Browse the repository at this point in the history
  • Loading branch information
biot committed Nov 22, 2014
1 parent 8e4d2c1 commit 06918ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tokenline.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static void show_help(t_tokenline *tl, int *words, int num_words)

if (num_words == 1)
/* Just "help" -- global command overview. */
tokens = tl->token_levels[0];
tokens = tl->token_levels[tl->token_level];
else
tokens = tl->parsed.last_token_entry->subtokens;
if (tokens) {
Expand Down Expand Up @@ -564,7 +564,7 @@ static void complete(t_tokenline *tl)
if (!tl->pos) {
/* Tab on an empty line: show all top-level commmands. */
tl->print(tl->user, NL);
tokens = tl->token_levels[0];
tokens = tl->token_levels[tl->token_level];
for (i = 0; tokens[i].token; i++) {
tl->print(tl->user, INDENT);
tl->print(tl->user, tl->token_dict[tokens[i].token].tokenstr);
Expand Down

0 comments on commit 06918ae

Please sign in to comment.