1
0
forked from aniani/vim

patch 9.0.1124: virtual text at a column position is truncated

Problem:    Virtual text at a column position is truncated at the window edge.
            (Yegappan Lakshmanan)
Solution:   Do not truncated virtual text that is placed at a column.
This commit is contained in:
Bram Moolenaar
2023-01-01 14:04:51 +00:00
parent 6bafdd41cb
commit 1aeb3eb092
4 changed files with 7 additions and 4 deletions

View File

@@ -643,7 +643,7 @@ text_prop_position(
int right = (tp->tp_flags & TP_FLAG_ALIGN_RIGHT);
int above = (tp->tp_flags & TP_FLAG_ALIGN_ABOVE);
int below = (tp->tp_flags & TP_FLAG_ALIGN_BELOW);
int wrap = (tp->tp_flags & TP_FLAG_WRAP);
int wrap = tp->tp_col < MAXCOL || (tp->tp_flags & TP_FLAG_WRAP);
int padding = tp->tp_col == MAXCOL && tp->tp_len > 1
? tp->tp_len - 1 : 0;
int col_with_padding = scr_col + (below ? 0 : padding);