mirror of
				https://github.com/vim/vim.git
				synced 2025-10-30 09:47:20 -04:00 
			
		
		
		
	patch 9.0.0148: a "below" aligned text property gets 'showbreak' displayed
Problem: A "below" aligned text property gets 'showbreak' displayed. Solution: Do not use 'showbreak' before or in virtual text. (issue #10851)
This commit is contained in:
		| @@ -392,6 +392,7 @@ win_line( | |||||||
| #ifdef FEAT_LINEBREAK | #ifdef FEAT_LINEBREAK | ||||||
|     int		need_showbreak = FALSE; // overlong line, skipping first x |     int		need_showbreak = FALSE; // overlong line, skipping first x | ||||||
| 					// chars | 					// chars | ||||||
|  |     int		dont_use_showbreak = FALSE;  // do not use 'showbreak' | ||||||
| #endif | #endif | ||||||
| #if defined(FEAT_SIGNS) || defined(FEAT_QUICKFIX) \ | #if defined(FEAT_SIGNS) || defined(FEAT_QUICKFIX) \ | ||||||
| 	|| defined(FEAT_SYN_HL) || defined(FEAT_DIFF) | 	|| defined(FEAT_SYN_HL) || defined(FEAT_DIFF) | ||||||
| @@ -1567,7 +1568,15 @@ win_line( | |||||||
| 			    if (*ptr == NUL) | 			    if (*ptr == NUL) | ||||||
| 				// don't combine char attr after EOL | 				// don't combine char attr after EOL | ||||||
| 				text_prop_flags &= ~PT_FLAG_COMBINE; | 				text_prop_flags &= ~PT_FLAG_COMBINE; | ||||||
|  | #ifdef FEAT_LINEBREAK | ||||||
|  | 			    if (below || right) | ||||||
|  | 			    { | ||||||
|  | 				// no 'showbreak' before "below" text property | ||||||
|  | 				// or after "right" text property | ||||||
|  | 				need_showbreak = FALSE; | ||||||
|  | 				dont_use_showbreak = TRUE; | ||||||
|  | 			    } | ||||||
|  | #endif | ||||||
| 			    // Keep in sync with where | 			    // Keep in sync with where | ||||||
| 			    // textprop_size_after_trunc() is called in | 			    // textprop_size_after_trunc() is called in | ||||||
| 			    // win_lbr_chartabsize(). | 			    // win_lbr_chartabsize(). | ||||||
| @@ -3441,9 +3450,11 @@ win_line( | |||||||
| 	    n_extra = 0; | 	    n_extra = 0; | ||||||
| 	    lcs_prec_todo = wp->w_lcs_chars.prec; | 	    lcs_prec_todo = wp->w_lcs_chars.prec; | ||||||
| #ifdef FEAT_LINEBREAK | #ifdef FEAT_LINEBREAK | ||||||
|  | 	    if (!dont_use_showbreak | ||||||
| # ifdef FEAT_DIFF | # ifdef FEAT_DIFF | ||||||
| 	    if (filler_todo <= 0) | 		    && filler_todo <= 0 | ||||||
| # endif | # endif | ||||||
|  | 	       ) | ||||||
| 		need_showbreak = TRUE; | 		need_showbreak = TRUE; | ||||||
| #endif | #endif | ||||||
| #ifdef FEAT_DIFF | #ifdef FEAT_DIFF | ||||||
|   | |||||||
| @@ -2311,6 +2311,7 @@ func Test_props_with_text_after() | |||||||
|   CheckRunVimInTerminal |   CheckRunVimInTerminal | ||||||
|  |  | ||||||
|   let lines =<< trim END |   let lines =<< trim END | ||||||
|  |       set showbreak=+++ | ||||||
|       call setline(1, 'some text here and other text there') |       call setline(1, 'some text here and other text there') | ||||||
|       call prop_type_add('rightprop', #{highlight: 'ErrorMsg'}) |       call prop_type_add('rightprop', #{highlight: 'ErrorMsg'}) | ||||||
|       call prop_type_add('afterprop', #{highlight: 'Search'}) |       call prop_type_add('afterprop', #{highlight: 'Search'}) | ||||||
|   | |||||||
| @@ -735,6 +735,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     148, | ||||||
| /**/ | /**/ | ||||||
|     147, |     147, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user