diff options
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/parser/luadoc.lua | 2 | ||||
-rw-r--r-- | test/crossfile/hover.lua | 24 |
3 files changed, 26 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index b6ef5db5..404239c9 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ ## 2.0.2 * `FIX` [#558](https://github.com/sumneko/lua-language-server/issues/558) * `FIX` [#567](https://github.com/sumneko/lua-language-server/issues/567) +* `FIX` [#568](https://github.com/sumneko/lua-language-server/issues/568) * `FIX` [#570](https://github.com/sumneko/lua-language-server/issues/570) * `FIX` [#571](https://github.com/sumneko/lua-language-server/issues/571) diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 335c8f24..3bb1b06e 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1123,7 +1123,7 @@ local function bindDocsBetween(sources, binded, bindSources, start, finish) -- 从前往后进行绑定 for i = index, max do local src = sources[i] - if src then + if src and src.start >= start then if src.start > finish then break end diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index e736e98c..54d8d93c 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -826,3 +826,27 @@ end name = 'k', } } + +TEST {{ path = 'a.lua', content = '', }, { + path = 'b.lua', + content = [[ +---@class bthci +bthci = {} + +---@class adv +---@field CONN_DIR_HI integer +---@field CHAN_ALL integer +bthci.adv = {} + +--- Sends a raw HCI command to the BlueTooth controller. +function bthci.<?rawhci?>(hcibytes, callback) end + +--- Resets the BlueTooth controller. +function bthci.reset(callback) end +]] +}, +hover = { + label = 'function bthci.rawhci(hcibytes: any, callback: any)', + name = 'bthci.rawhci', + description = " Sends a raw HCI command to the BlueTooth controller." +}} |