mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.1800: Cursor position still wrong with 'showbreak' and virtual text
Problem: Cursor position still wrong with 'showbreak' and virtual text after last character or 'listchars' "eol". Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also fix first char of virtual text not shown at the start of a screen line. closes: #12478 closes: #12532 closes: #12904 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
committed by
Christian Brabandt
parent
9a6cf34a1e
commit
6a3897232a
@@ -1358,13 +1358,13 @@ win_lbr_chartabsize(
|
||||
head_mid += get_breakindent_win(wp, line);
|
||||
if (head_mid > 0 && wcol + size > wp->w_width)
|
||||
{
|
||||
// calculate effective window width
|
||||
// Calculate effective window width.
|
||||
int prev_rem = wp->w_width - wcol;
|
||||
int width = width2 - head_mid;
|
||||
|
||||
if (width <= 0)
|
||||
width = 1;
|
||||
// divide "size - prev_width" by "width", rounding up
|
||||
// Divide "size - prev_rem" by "width", rounding up.
|
||||
int cnt = (size - prev_rem + width - 1) / width;
|
||||
added += cnt * head_mid;
|
||||
|
||||
|
Reference in New Issue
Block a user