diff src/drawline.c @ 30767:5dba398584fd v9.0.0718

patch 9.0.0718: extra empty line between two virtual text "below" Commit: https://github.com/vim/vim/commit/ccf2837a05cef0ea4913ebff4f2f6000bc050271 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 10 21:10:03 2022 +0100 patch 9.0.0718: extra empty line between two virtual text "below" Problem: Extra empty line between two virtual text "below" when 'wrap' and 'number' are set. Solution: Reset "before" when there is no text in the screen line. (closes #11334)
author Bram Moolenaar <Bram@vim.org>
date Mon, 10 Oct 2022 22:15:03 +0200
parents 3002177fa0b1
children fc9993c5835a
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -639,7 +639,7 @@ text_prop_position(
 
     if (wrap || right || above || below || padding > 0 || n_used < *n_extra)
     {
-	int	    col_off = win_col_off(wp) + win_col_off2(wp);
+	int	    col_off = win_col_off(wp) - win_col_off2(wp);
 	int	    skip_add = 0;
 
 	if (above)
@@ -655,7 +655,7 @@ text_prop_position(
 	    if (before < 0
 		    || !(right || below)
 		    || (below
-			? (col_with_padding == 0 || !wp->w_p_wrap)
+			? (col_with_padding <= col_off || !wp->w_p_wrap)
 			: (n_used < *n_extra)))
 	    {
 		if (right && (wrap || room < PROP_TEXT_MIN_CELLS))