mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
completions: Fix completions in identifiers
This commit is contained in:
parent
e9206809d6
commit
1205fc42ea
1 changed files with 4 additions and 4 deletions
|
@ -81,10 +81,10 @@ def complete(
|
||||||
if tokens[token_idx].type == TokenType.IDENT:
|
if tokens[token_idx].type == TokenType.IDENT:
|
||||||
idx = tokens[token_idx].start
|
idx = tokens[token_idx].start
|
||||||
token_idx -= 1
|
token_idx -= 1
|
||||||
else:
|
|
||||||
while tokens[token_idx].type == TokenType.WHITESPACE:
|
while tokens[token_idx].type == TokenType.WHITESPACE:
|
||||||
idx = tokens[token_idx].start
|
idx = tokens[token_idx].start
|
||||||
token_idx -= 1
|
token_idx -= 1
|
||||||
|
|
||||||
child_node = ast_node.get_child_at(idx)
|
child_node = ast_node.get_child_at(idx)
|
||||||
# If the cursor is at the end of a node, completions should be for the next child of the parent, unless the node
|
# If the cursor is at the end of a node, completions should be for the next child of the parent, unless the node
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue