diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-11 14:54:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-11 14:54:42 +0100 |
commit | 9466fb8001227a4bc9045e91045426bc40680366 (patch) | |
tree | cd7d96d07d6a27a2072975a5e07310c9acb82365 /src/drawline.c | |
parent | 0c502d2e7031611788c301c7da0896f0fd9515fd (diff) |
patch 9.0.0721: virtual text "above" with padding not displayed correctlyv9.0.0721
Problem: Virtual text "above" with padding not displayed correctly.
Solution: Take padding into account when truncating. (closes #11340)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drawline.c b/src/drawline.c index bc1b20a19f..b71bedefab 100644 --- 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)) { |