From 8eaf3c4f8c2ee4dc5a6e12bb809058ad263dbb65 Mon Sep 17 00:00:00 2001 From: Ibby <33922797+SleepySwords@users.noreply.github.com> Date: Sun, 26 Mar 2023 00:10:28 +1100 Subject: vim-patch:9.0.0143: cursor positioned after virtual text in empty line Problem: Cursor positioned after virtual text in empty line. Solution: Keep cursor in the first column. (closes vim/vim#10786) https://github.com/vim/vim/commit/afd2aa79eda3fe69f2e7c87d0b9b4bca874f386a --- src/nvim/plines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/plines.c b/src/nvim/plines.c index dd4955c352..1c6ed4f4c1 100644 --- a/src/nvim/plines.c +++ b/src/nvim/plines.c @@ -390,7 +390,7 @@ int win_lbr_chartabsize(chartabsize_T *cts, int *headp) // First get normal size, without 'linebreak' or virtual text int size = win_chartabsize(wp, s, vcol); - if (cts->cts_has_virt_text) { + if (cts->cts_has_virt_text && *line != NUL) { int col = (int)(s - line); while (true) { mtkey_t mark = marktree_itr_current(cts->cts_iter); -- cgit