Compare commits

..

2 Commits

Author SHA1 Message Date
27d3bf6b24
refactor(nvim): prioritize global marks in statuscol
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
2024-04-22 10:07:44 -05:00
6bddbdbb46
refactor(nvim): disable statuscol marks on virtual lines 2024-04-22 09:05:07 -05:00

View File

@ -42,16 +42,6 @@ return {
text = {
function(args)
local get_mark = function()
local local_mark_buf = vim.iter(vim.fn.getmarklist(args.buf))
:filter(function(mark)
local lnum = mark.pos[2]
return lnum == args.lnum
end)
:next()
if local_mark_buf then
return local_mark_buf.mark:sub(-1)
end
local bufname = vim.api.nvim_buf_get_name(args.buf)
local global_mark_buf = vim.iter(vim.fn.getmarklist())
:filter(function(mark)
@ -65,6 +55,16 @@ return {
return global_mark_buf.mark:sub(-1)
end
local local_mark_buf = vim.iter(vim.fn.getmarklist(args.buf))
:filter(function(mark)
local lnum = mark.pos[2]
return lnum == args.lnum
end)
:next()
if local_mark_buf then
return local_mark_buf.mark:sub(-1)
end
return " "
end
local mark = get_mark()
@ -76,6 +76,9 @@ return {
end,
},
condition = {
function(args)
return args.virtnum == 0
end,
std_condition,
},
},