diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-08-29 17:45:09 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-08-29 17:45:09 +0200 |
| commit | 5d8801804180f7f0ab09b97bbdf8ae41e619c759 (patch) | |
| tree | 3fb67f04fb0978ac88d0782ba237c45a0e3b1f92 /init.lua | |
| parent | 795beac9e6a98794fd8320bd2317e01ed329148b (diff) | |
| download | vis-lspc-5d8801804180f7f0ab09b97bbdf8ae41e619c759.tar.gz vis-lspc-5d8801804180f7f0ab09b97bbdf8ae41e619c759.zip | |
fix hover result determination
If the result is MarkedString[] the table must have a length > 0,
because all returned object types are represented as lua tables.
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -774,7 +774,7 @@ local function lspc_handle_hover_method_response(win, result, old_pos) local hover_msg = '' -- result is MarkedString[] - if type(result.contents) == 'table' then + if type(result.contents) == 'table' and #result.contents > 0 then lspc.log('hover returned list of length ' .. #result.contents) for i, v in ipairs(result.contents) do if i == 1 then |
