comparison src/sign.c @ 19447:5b82f041dbbb v8.2.0281

patch 8.2.0281: two placed signs in the same line are not combined Commit: https://github.com/vim/vim/commit/a2f6e42ded067df8ee682c15aa246491a389b1a0 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 19 17:13:04 2020 +0100 patch 8.2.0281: two placed signs in the same line are not combined Problem: Two placed signs in the same line are not combined. E.g. in the terminal debugger a breakpoint and the PC cannot be both be displayed. Solution: Combine the sign column and line highlight attributes.
author Bram Moolenaar <Bram@vim.org>
date Wed, 19 Feb 2020 17:15:04 +0100
parents 5cd0986ab02e
children 435726a03481
comparison
equal deleted inserted replaced
19446:972f89992ae8 19447:5b82f041dbbb
512 sattr->sat_text = sp->sn_text; 512 sattr->sat_text = sp->sn_text;
513 if (sattr->sat_text != NULL && sp->sn_text_hl > 0) 513 if (sattr->sat_text != NULL && sp->sn_text_hl > 0)
514 sattr->sat_texthl = syn_id2attr(sp->sn_text_hl); 514 sattr->sat_texthl = syn_id2attr(sp->sn_text_hl);
515 if (sp->sn_line_hl > 0) 515 if (sp->sn_line_hl > 0)
516 sattr->sat_linehl = syn_id2attr(sp->sn_line_hl); 516 sattr->sat_linehl = syn_id2attr(sp->sn_line_hl);
517
518 // If there is another sign next with the same priority, may
519 // combine the text and the line highlighting.
520 if (sign->se_next != NULL
521 && sign->se_next->se_priority == sign->se_priority
522 && sign->se_next->se_lnum == sign->se_lnum)
523 {
524 sign_T *next_sp = find_sign_by_typenr(sign->se_next->se_typenr);
525
526 if (next_sp != NULL)
527 {
528 if (sattr->sat_icon == NULL && sattr->sat_text == NULL)
529 {
530 # ifdef FEAT_SIGN_ICONS
531 sattr->sat_icon = next_sp->sn_image;
532 # endif
533 sattr->sat_text = next_sp->sn_text;
534 }
535 if (sp->sn_text_hl <= 0 && next_sp->sn_text_hl > 0)
536 sattr->sat_texthl = syn_id2attr(next_sp->sn_text_hl);
537 if (sp->sn_line_hl <= 0 && next_sp->sn_line_hl > 0)
538 sattr->sat_linehl = syn_id2attr(next_sp->sn_line_hl);
539 }
540 }
517 return TRUE; 541 return TRUE;
518 } 542 }
519 } 543 }
520 return FALSE; 544 return FALSE;
521 } 545 }