summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-15 19:16:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-15 19:16:24 +0800
commita2f59497abe5833361ca2825596dbdd4c7213475 (patch)
treef5c91030aa5a500318b97dcafc346634690bc5f9
parent7b018aa08d0cc2b052c50fba34d94f35a3421683 (diff)
downloadlua-language-server-a2f59497abe5833361ca2825596dbdd4c7213475.zip
`FIX` hover: always view string
-rw-r--r--changelog.md1
-rw-r--r--script/core/hover/description.lua2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index f4317b92..ac91756f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,6 +3,7 @@
## 2.5.4
* `FIX` [#848](https://github.com/sumneko/lua-language-server/issues/848)
* `FIX` completion: incorrect cache
+* `FIX` hover: always view string
## 2.5.3
`2021-12-6`
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index 725ea7a5..1af459c3 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -63,7 +63,7 @@ end
local function asStringView(source, literal)
-- 内部包含转义符?
- local rawLen = source.finish - source.start - 2 * #source[2] + 1
+ local rawLen = source.finish - source.start - 2 * #source[2]
if config.get 'Lua.hover.viewString'
and (source[2] == '"' or source[2] == "'")
and rawLen > #literal then