diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/lsp/completion.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/lsp/completion.c b/src/main/lsp/completion.c index 8a41285..51164e1 100644 --- a/src/main/lsp/completion.c +++ b/src/main/lsp/completion.c @@ -29,7 +29,8 @@ struct symbol { }; static struct symbol current_symbol(struct buffer *buffer, struct location at) { - struct region word = buffer_word_at(buffer, at); + // use previous char here since the cursor has moved after typing + struct region word = buffer_word_at(buffer, buffer_previous_char(buffer, at)); if (!region_has_size(word)) { return (struct symbol){ .symbol = |
