Mercurial > vim
comparison src/drawline.c @ 32894:5c72cda80e1c v9.0.1756
patch 9.0.1756: failing cursorline sign test
Commit: https://github.com/vim/vim/commit/e1eaae27f4f2d2522e45397756f3bca42be50988
Author: Christian Brabandt <cb@256bit.org>
Date: Sat Aug 19 22:36:12 2023 +0200
patch 9.0.1756: failing cursorline sign test
Problem: failing cursorline sign test
Solution: only reset char attr, if cursorline
option is not set
Unfortunately, commit dbeadf05b6a152e7d9c5cc23d9202057f8e99884 causes a
failure with the sign test Test_sign_cursor_position()
The root cause is, that resetting the character attribute will also
reset the existing cursor line highlighting and this breaks the test,
that expects the cursor line highlighting to overrule the sign line
highlighting.
So change the condition to reset the character attribute by making sure
that this only happens, if the 'cursorline' option is not active and the
cursor is not at the same line as the line to be drawn
closes: #12854
closes: #12859
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 19 Aug 2023 22:45:03 +0200 |
parents | ec310fcd2d12 |
children | 8325b9a4c732 |
comparison
equal
deleted
inserted
replaced
32893:4b9becc20f9f | 32894:5c72cda80e1c |
---|---|
3341 || (wp->w_p_list && | 3341 || (wp->w_p_list && |
3342 wp->w_lcs_chars.eol > 0))) | 3342 wp->w_lcs_chars.eol > 0))) |
3343 wlv.char_attr = wlv.line_attr; | 3343 wlv.char_attr = wlv.line_attr; |
3344 #ifdef FEAT_SIGNS | 3344 #ifdef FEAT_SIGNS |
3345 // At end of line: if Sign is present with line highlight, reset char_attr | 3345 // At end of line: if Sign is present with line highlight, reset char_attr |
3346 if (sign_present && wlv.sattr.sat_linehl > 0 && wlv.draw_state == WL_LINE) | 3346 // but not when cursorline is active |
3347 if (sign_present && wlv.sattr.sat_linehl > 0 && wlv.draw_state == WL_LINE | |
3348 && !(wp->w_p_cul && lnum == wp->w_cursor.lnum)) | |
3347 wlv.char_attr = wlv.sattr.sat_linehl; | 3349 wlv.char_attr = wlv.sattr.sat_linehl; |
3348 #endif | 3350 #endif |
3349 # ifdef FEAT_DIFF | 3351 # ifdef FEAT_DIFF |
3350 if (wlv.diff_hlf == HLF_TXD) | 3352 if (wlv.diff_hlf == HLF_TXD) |
3351 { | 3353 { |