comparison src/drawline.c @ 25517:b04e76e66128 v8.2.3295

patch 8.2.3295: 'cursorline' should not apply to 'breakindent' Commit: https://github.com/vim/vim/commit/4f33bc20d7d5444e44d13f954e8219ad1abd26ef Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Aug 5 17:57:02 2021 +0200 patch 8.2.3295: 'cursorline' should not apply to 'breakindent' Problem: 'cursorline' should not apply to 'breakindent'. Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak' consistently. (closes #8684)
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 Aug 2021 18:00:05 +0200
parents ac54d215fbec
children d1457c3f156c
comparison
equal deleted inserted replaced
25516:3abc660b43f4 25517:b04e76e66128
1003 int did_decrement_ptr = FALSE; 1003 int did_decrement_ptr = FALSE;
1004 #endif 1004 #endif
1005 // Skip this quickly when working on the text. 1005 // Skip this quickly when working on the text.
1006 if (draw_state != WL_LINE) 1006 if (draw_state != WL_LINE)
1007 { 1007 {
1008 #ifdef FEAT_SYN_HL
1009 if (cul_screenline)
1010 {
1011 cul_attr = 0;
1012 line_attr = line_attr_save;
1013 }
1014 #endif
1015
1008 #ifdef FEAT_CMDWIN 1016 #ifdef FEAT_CMDWIN
1009 if (draw_state == WL_CMDLINE - 1 && n_extra == 0) 1017 if (draw_state == WL_CMDLINE - 1 && n_extra == 0)
1010 { 1018 {
1011 draw_state = WL_CMDLINE; 1019 draw_state = WL_CMDLINE;
1012 if (cmdwin_type != 0 && wp == curwin) 1020 if (cmdwin_type != 0 && wp == curwin)
1192 ) 1200 )
1193 { 1201 {
1194 char_attr = 0; 1202 char_attr = 0;
1195 # ifdef FEAT_DIFF 1203 # ifdef FEAT_DIFF
1196 if (diff_hlf != (hlf_T)0) 1204 if (diff_hlf != (hlf_T)0)
1197 {
1198 char_attr = HL_ATTR(diff_hlf); 1205 char_attr = HL_ATTR(diff_hlf);
1199 # ifdef FEAT_SYN_HL
1200 if (cul_attr != 0)
1201 char_attr = hl_combine_attr(char_attr, cul_attr);
1202 # endif
1203 }
1204 # endif 1206 # endif
1205 p_extra = NULL; 1207 p_extra = NULL;
1206 c_extra = ' '; 1208 c_extra = ' ';
1207 c_final = NUL; 1209 c_final = NUL;
1208 n_extra = get_breakindent_win(wp, 1210 n_extra = get_breakindent_win(wp,
1295 else 1297 else
1296 char_attr = win_attr; 1298 char_attr = win_attr;
1297 } 1299 }
1298 } 1300 }
1299 #ifdef FEAT_SYN_HL 1301 #ifdef FEAT_SYN_HL
1300 if (cul_screenline) 1302 if (cul_screenline && draw_state == WL_LINE
1301 { 1303 && vcol >= left_curline_col
1302 if (draw_state == WL_LINE 1304 && vcol < right_curline_col)
1303 && vcol >= left_curline_col 1305 {
1304 && vcol < right_curline_col) 1306 cul_attr = HL_ATTR(HLF_CUL);
1305 { 1307 line_attr = cul_attr;
1306 cul_attr = HL_ATTR(HLF_CUL);
1307 line_attr = cul_attr;
1308 }
1309 else
1310 {
1311 cul_attr = 0;
1312 line_attr = line_attr_save;
1313 }
1314 } 1308 }
1315 #endif 1309 #endif
1316 1310
1317 // When still displaying '$' of change command, stop at cursor. 1311 // When still displaying '$' of change command, stop at cursor.
1318 // When only displaying the (relative) line number and that's done, 1312 // When only displaying the (relative) line number and that's done,