mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(column): apply numhl signs when 'signcolumn' is "no" (#26167)
This commit is contained in:
		| @@ -713,9 +713,7 @@ void decor_redraw_signs(win_T *wp, buf_T *buf, int row, SignTextAttrs sattrs[], | ||||
|                         int *cul_id, int *num_id) | ||||
| { | ||||
|   MarkTreeIter itr[1]; | ||||
|   if (!buf->b_signs | ||||
|       || wp->w_minscwidth == SCL_NO | ||||
|       || !marktree_itr_get_overlap(buf->b_marktree, row, 0, itr)) { | ||||
|   if (!buf->b_signs || !marktree_itr_get_overlap(buf->b_marktree, row, 0, itr)) { | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -685,4 +685,21 @@ describe('Signs', function() | ||||
|                                                            | | ||||
|     ]]) | ||||
|   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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 luukvbaal
					luukvbaal