mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-27 19:28:59 +02:00
fix(ui): signcolumn signs on nightly. Fixes #2039
This commit is contained in:
parent
4ebda08d49
commit
11a8a6bea7
1 changed files with 13 additions and 6 deletions
|
@ -10,12 +10,19 @@ local M = {}
|
|||
function M.get_signs(buf, lnum)
|
||||
-- Get regular signs
|
||||
---@type Sign[]
|
||||
local signs = vim.tbl_map(function(sign)
|
||||
---@type Sign
|
||||
local ret = vim.fn.sign_getdefined(sign.name)[1]
|
||||
ret.priority = sign.priority
|
||||
return ret
|
||||
end, vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum })[1].signs)
|
||||
local signs = {}
|
||||
|
||||
if vim.fn.has("nvim-0.10") == 0 then
|
||||
-- Only needed for Neovim <0.10
|
||||
-- Newer versions include legacy signs in nvim_buf_get_extmarks
|
||||
for _, sign in ipairs(vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum })[1].signs) do
|
||||
local ret = vim.fn.sign_getdefined(sign.name)[1] --[[@as Sign]]
|
||||
if ret then
|
||||
ret.priority = sign.priority
|
||||
signs[#signs + 1] = ret
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Get extmark signs
|
||||
local extmarks = vim.api.nvim_buf_get_extmarks(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue