From 85111ca0f4916ade5caa4e1ca836d615afdba6f8 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Thu, 12 Jan 2023 10:40:53 +0100 Subject: fix(column)!: ensure 'statuscolumn' works with virtual and wrapped lines Problem: The `'statuscolumn'` was not re-evaluated for wrapped lines, when preceded by virtual/filler lines. There was also no way to distinguish virtual and wrapped lines in the status column. Solution: Make sure to rebuild the statuscolumn, and replace variable `v:wrap` with `v:virtnum`. `v:virtnum` is negative when drawing virtual lines, zero when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line. --- runtime/doc/eval.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'runtime/doc/eval.txt') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6feb5cbb49..0ac8152144 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2295,13 +2295,15 @@ v:version Vim version number: major version times 100 plus minor :if has("nvim-0.2.1") < - *v:vim_did_enter* *vim_did_enter-variable* -v:vim_did_enter 0 during startup, 1 just before |VimEnter|. + *v:virtnum* *virtnum-variable* +v:virtnum Virtual line number for the 'statuscolumn' expression. + Negative when drawing the status column for virtual lines, zero + when drawing an actual buffer line, and positive when drawing + the wrapped part of a buffer line. Read-only. - *v:wrap* *wrap-variable* -v:wrap Boolean indicating whether 'statuscolumn' is being evaluated - for the wrapped part of a line. + *v:vim_did_enter* *vim_did_enter-variable* +v:vim_did_enter 0 during startup, 1 just before |VimEnter|. Read-only. *v:warningmsg* *warningmsg-variable* -- cgit