summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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