From e81ad18d4d5d464b1627a14923a4aa879bcfbc90 Mon Sep 17 00:00:00 2001 From: nsf Date: Fri, 13 Oct 2017 11:38:41 +0500 Subject: [PATCH] Fix struct autocompletion. --- cursorcontext.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cursorcontext.go b/cursorcontext.go index 261634db..760e17f5 100644 --- a/cursorcontext.go +++ b/cursorcontext.go @@ -133,8 +133,9 @@ func (ti *token_iterator) extract_type_alike() string { if ti.token().tok != token.IDENT { // not lib.Foo, return Foo return b } + out := ti.token().literal() + "." + b // lib.Foo ti.go_back() - return ti.token().literal() + "." + b // lib.Foo + return out } // Extract the type expression right before the enclosing curly bracket block.