aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/diagnostic.lua
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2021-04-14 02:11:47 +0200
committerMarco Hinz <mh.codebro@gmail.com>2021-04-14 02:11:47 +0200
commit6b16ec701e6557df0335203ce622c35466769784 (patch)
treeb4cccf7bfc32e764c7ea3cb71b132ae5d7ac27bb /runtime/lua/vim/lsp/diagnostic.lua
parent391fe1064ed3d1f1c922819923f67eca1b1bc9fc (diff)
downloadrneovim-6b16ec701e6557df0335203ce622c35466769784.tar.gz
rneovim-6b16ec701e6557df0335203ce622c35466769784.tar.bz2
rneovim-6b16ec701e6557df0335203ce622c35466769784.zip
lsp: fix off-by-one in line diagnostic highlighting
Diffstat (limited to 'runtime/lua/vim/lsp/diagnostic.lua')
-rw-r--r--runtime/lua/vim/lsp/diagnostic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua
index bd7ef9cfdc..e6132e78bf 100644
--- a/runtime/lua/vim/lsp/diagnostic.lua
+++ b/runtime/lua/vim/lsp/diagnostic.lua
@@ -1140,7 +1140,7 @@ function M.show_line_diagnostics(opts, bufnr, line_nr, client_id)
local message_lines = vim.split(diagnostic.message, '\n', true)
table.insert(lines, prefix..message_lines[1])
- table.insert(highlights, {#prefix + 1, hiname})
+ table.insert(highlights, {#prefix, hiname})
for j = 2, #message_lines do
table.insert(lines, message_lines[j])
table.insert(highlights, {0, hiname})