Skip to content

Commit

Permalink
fix #780
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Nov 15, 2021
1 parent 3dec75e commit e271d36
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2.4.8
* `FIX` [#778](https://github.com/sumneko/lua-language-server/issues/778)
* `FIX` [#780](https://github.com/sumneko/lua-language-server/issues/780)

## 2.4.7
`2021-10-27`
Expand Down
3 changes: 2 additions & 1 deletion script/core/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,8 @@ end

local function isInString(state, position)
return guide.eachSourceContain(state.ast, position, function (source)
if source.type == 'string' then
if source.type == 'string'
and source.start < position then
return true
end
end)
Expand Down
10 changes: 10 additions & 0 deletions test/completion/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2680,3 +2680,13 @@ end
kind = define.CompletionItemKind.Variable,
}
}

TEST [[
utf<??>'xxx'
]]
{
[1] = {
label = 'utf8',
kind = define.CompletionItemKind.Field,
}
}

0 comments on commit e271d36

Please sign in to comment.