mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-27 11:19:02 +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)
|
function M.get_signs(buf, lnum)
|
||||||
-- Get regular signs
|
-- Get regular signs
|
||||||
---@type Sign[]
|
---@type Sign[]
|
||||||
local signs = vim.tbl_map(function(sign)
|
local signs = {}
|
||||||
---@type Sign
|
|
||||||
local ret = vim.fn.sign_getdefined(sign.name)[1]
|
if vim.fn.has("nvim-0.10") == 0 then
|
||||||
ret.priority = sign.priority
|
-- Only needed for Neovim <0.10
|
||||||
return ret
|
-- Newer versions include legacy signs in nvim_buf_get_extmarks
|
||||||
end, vim.fn.sign_getplaced(buf, { group = "*", lnum = lnum })[1].signs)
|
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
|
-- Get extmark signs
|
||||||
local extmarks = vim.api.nvim_buf_get_extmarks(
|
local extmarks = vim.api.nvim_buf_get_extmarks(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue