0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

patch 9.0.0975: virtual text below empty line misplaced when 'number' set

Problem:    Virtual text below an empty line is misplaced when 'number' is
            set.
Solution:   Adjust the computations. (closes #11629)
This commit is contained in:
Bram Moolenaar
2022-11-29 21:37:13 +00:00
parent dffa6ea85c
commit 7c02ad9f89
4 changed files with 16 additions and 3 deletions

View File

@@ -663,9 +663,9 @@ text_prop_position(
before -= cells;
// Below-align: empty line add one character
if (below && vcol == 0 && col_with_padding == 0
&& wp->w_width == before)
col_with_padding = 1;
if (below && vcol == 0 && col_with_padding == col_off
&& wp->w_width - col_off == before)
col_with_padding += 1;
if (before < 0
|| !(right || below)