comparison src/drawline.c @ 29090:9b292596a332 v8.2.5066

patch 8.2.5066: timer_create is not available on every Mac system Commit: https://github.com/vim/vim/commit/aca12fd89b082dd9cc12ae085a84f1805747bbdf Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 7 10:16:15 2022 +0100 patch 8.2.5066: timer_create is not available on every Mac system Problem: Timer_create is not available on every Mac system. (Hisashi T Fujinaka) Solution: Adjust #ifdef.
author Bram Moolenaar <Bram@vim.org>
date Tue, 07 Jun 2022 11:30:04 +0200
parents a79f44a2d1ce
children bfb205095634
comparison
equal deleted inserted replaced
29089:71d4dc25eb4b 29090:9b292596a332
765 765
766 if (wp->w_p_list) 766 if (wp->w_p_list)
767 { 767 {
768 if (wp->w_lcs_chars.space 768 if (wp->w_lcs_chars.space
769 || wp->w_lcs_chars.multispace != NULL 769 || wp->w_lcs_chars.multispace != NULL
770 || wp->w_lcs_chars.leadmultispace != NULL
770 || wp->w_lcs_chars.trail 771 || wp->w_lcs_chars.trail
771 || wp->w_lcs_chars.lead 772 || wp->w_lcs_chars.lead
772 || wp->w_lcs_chars.nbsp) 773 || wp->w_lcs_chars.nbsp)
773 extra_check = TRUE; 774 extra_check = TRUE;
774 775
779 while (trailcol > (colnr_T)0 && VIM_ISWHITE(ptr[trailcol - 1])) 780 while (trailcol > (colnr_T)0 && VIM_ISWHITE(ptr[trailcol - 1]))
780 --trailcol; 781 --trailcol;
781 trailcol += (colnr_T) (ptr - line); 782 trailcol += (colnr_T) (ptr - line);
782 } 783 }
783 // find end of leading whitespace 784 // find end of leading whitespace
784 if (wp->w_lcs_chars.lead) 785 if (wp->w_lcs_chars.lead || wp->w_lcs_chars.leadmultispace != NULL)
785 { 786 {
786 leadcol = 0; 787 leadcol = 0;
787 while (VIM_ISWHITE(ptr[leadcol])) 788 while (VIM_ISWHITE(ptr[leadcol]))
788 ++leadcol; 789 ++leadcol;
789 if (ptr[leadcol] == NUL) 790 if (ptr[leadcol] == NUL)
2116 } 2117 }
2117 2118
2118 if ((trailcol != MAXCOL && ptr > line + trailcol && c == ' ') 2119 if ((trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
2119 || (leadcol != 0 && ptr < line + leadcol && c == ' ')) 2120 || (leadcol != 0 && ptr < line + leadcol && c == ' '))
2120 { 2121 {
2121 c = (ptr > line + trailcol) ? wp->w_lcs_chars.trail 2122 if (leadcol != 0 && in_multispace && ptr < line + leadcol
2122 : wp->w_lcs_chars.lead; 2123 && wp->w_lcs_chars.leadmultispace != NULL)
2124 {
2125 c = wp->w_lcs_chars.leadmultispace[multispace_pos++];
2126 if (wp->w_lcs_chars.leadmultispace[multispace_pos] == NUL)
2127 multispace_pos = 0;
2128 }
2129
2130 else if (ptr > line + trailcol && wp->w_lcs_chars.trail)
2131 c = wp->w_lcs_chars.trail;
2132
2133 else if (ptr < line + leadcol && wp->w_lcs_chars.lead)
2134 c = wp->w_lcs_chars.lead;
2135
2136 else if (leadcol != 0 && c == ' ' && wp->w_lcs_chars.space)
2137 c = wp->w_lcs_chars.space;
2138
2139
2123 if (!attr_pri) 2140 if (!attr_pri)
2124 { 2141 {
2125 n_attr = 1; 2142 n_attr = 1;
2126 extra_attr = hl_combine_attr(win_attr, HL_ATTR(HLF_8)); 2143 extra_attr = hl_combine_attr(win_attr, HL_ATTR(HLF_8));
2127 saved_attr2 = char_attr; // save current attr 2144 saved_attr2 = char_attr; // save current attr