mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(column): apply numhl signs when 'signcolumn' is "no" (#26167)
This commit is contained in:
parent
62dc1f2663
commit
c126a3756a
@ -713,9 +713,7 @@ void decor_redraw_signs(win_T *wp, buf_T *buf, int row, SignTextAttrs sattrs[],
|
|||||||
int *cul_id, int *num_id)
|
int *cul_id, int *num_id)
|
||||||
{
|
{
|
||||||
MarkTreeIter itr[1];
|
MarkTreeIter itr[1];
|
||||||
if (!buf->b_signs
|
if (!buf->b_signs || !marktree_itr_get_overlap(buf->b_marktree, row, 0, itr)) {
|
||||||
|| wp->w_minscwidth == SCL_NO
|
|
||||||
|| !marktree_itr_get_overlap(buf->b_marktree, row, 0, itr)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -685,4 +685,21 @@ describe('Signs', function()
|
|||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('numhl highlight is applied when signcolumn=no', function()
|
||||||
|
screen:try_resize(screen._width, 4)
|
||||||
|
command([[
|
||||||
|
set nu scl=no
|
||||||
|
call setline(1, ['line1', 'line2', 'line3'])
|
||||||
|
call nvim_buf_set_extmark(0, nvim_create_namespace('test'), 0, 0, {'number_hl_group':'Error'})
|
||||||
|
call sign_define('foo', { 'text':'F', 'numhl':'Error' })
|
||||||
|
call sign_place(0, '', 'foo', bufnr(''), { 'lnum':2 })
|
||||||
|
]])
|
||||||
|
screen:expect([[
|
||||||
|
{8: 1 }^line1 |
|
||||||
|
{8: 2 }line2 |
|
||||||
|
{6: 3 }line3 |
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user