diff src/drawline.c @ 30773:fc9993c5835a v9.0.0721

patch 9.0.0721: virtual text "above" with padding not displayed correctly Commit: https://github.com/vim/vim/commit/9466fb8001227a4bc9045e91045426bc40680366 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 11 14:54:42 2022 +0100 patch 9.0.0721: virtual text "above" with padding not displayed correctly Problem: Virtual text "above" with padding not displayed correctly. Solution: Take padding into account when truncating. (closes https://github.com/vim/vim/issues/11340)
author Bram Moolenaar <Bram@vim.org>
date Tue, 11 Oct 2022 16:00:05 +0200
parents 5dba398584fd
children a9a46fbfd786
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -459,7 +459,7 @@ handle_lnum_col(
 handle_breakindent(win_T *wp, winlinevars_T *wlv)
 {
     if (wp->w_briopt_sbr && wlv->draw_state == WL_BRI - 1
-		    && *get_showbreak_value(wp) != NUL)
+					    && *get_showbreak_value(wp) != NUL)
 	// draw indent after showbreak value
 	wlv->draw_state = WL_BRI;
     else if (wp->w_briopt_sbr && wlv->draw_state == WL_SBR)
@@ -586,7 +586,7 @@ textprop_size_after_trunc(
     // if the remaining size is to small wrap anyway and use the next line
     if (space < PROP_TEXT_MIN_CELLS)
 	space += wp->w_width;
-    if (flags & TP_FLAG_ALIGN_BELOW)
+    if (flags & (TP_FLAG_ALIGN_BELOW | TP_FLAG_ALIGN_ABOVE))
 	space -= padding;
     for (n_used = 0; n_used < len; n_used += (*mb_ptr2len)(text + n_used))
     {