-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support for statuscolumn #1037
base: main
Are you sure you want to change the base?
Conversation
1f2e274
to
28feeed
Compare
28feeed
to
87dec80
Compare
table.insert(res, '%#' .. s[2] .. '#') | ||
table.insert(res, s[1]) | ||
res_len = res_len + vim.str_utfindex(s[1]) | ||
table.insert(res, '%#NONE#') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want %*
here to restore the currently active default statuscolumn highlight (affected by cursorline etc). (Unless this does the same?)
if next(signs.signs) then | ||
max_pad = 2 | ||
end | ||
local marks = api.nvim_buf_get_extmarks(0, signs.ns, { lnum - 1, 0 }, { lnum - 1, -1 }, {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local marks = api.nvim_buf_get_extmarks(0, signs.ns, { lnum - 1, 0 }, { lnum - 1, -1 }, {}) | |
local buf = api.nvim_win_get_buf(vim.g.statusline_winid) | |
local marks = api.nvim_buf_get_extmarks(buf, signs.ns, { lnum - 1, 0 }, { lnum - 1, -1 }, {}) |
I suppose there is no need to change the function signature like I suggested on matrix.
api.nvim__redraw({ | ||
buf = bufnr, | ||
range = { top, bot }, | ||
statuscolumn = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you experience that both range
and statuscolumn
are necessary? The entire window should already be redrawn with statuscolumn = true
. But yeah previously placing sign extmarks was what triggered redraws so since that doesn't happen here anymore I think these manual redraws are necessary.
No description provided.