[vim/vim] Window screen gets wrong when a virtual text is placed on 'above' or 'below' on an empty line (Issue #11959)

12 views
Skip to first unread message

rickhowe

unread,
Feb 8, 2023, 1:18:31 AM2/8/23
to vim/vim, Subscribed

Steps to reproduce

On the following window:

bb

Run the following script to place '---' above and '+++' below on each line:

let vt = 'test'
call prop_type_delete(vt)
call prop_type_add(vt, {'highlight': 'ToDo'})
for ln in range(1, line('$'))
  call prop_add(ln, 0, {'type': vt, 'text': '---', 'text_align': 'above'})
  call prop_add(ln, 0, {'type': vt, 'text': '+++', 'text_align': 'below'})
endfor

aa

The empty lines on both line 2 and 4 are gone. Then the line number appears on the virtual text and the cursor appears out of last line 5.

Expected behaviour

The empty lines should be left displayed as well.

Version of Vim

9.0.1291

Environment

Windows 10

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11959@github.com>

Bram Moolenaar

unread,
Feb 11, 2023, 8:49:48 AM2/11/23
to vim/vim, Subscribed

Closed #11959 as completed via 9d9a20e.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11959/issue_event/8496568825@github.com>

rickhowe

unread,
Feb 11, 2023, 11:20:13 PM2/11/23
to vim/vim, Subscribed

Thank you for your immediate fixing, but I still see some problem.

  1. When &list is on, eol ($) does not appear on the empty line but on the "above" virtual lines.

33

  1. If we do not use "below" but use "above" only, the screen looks OK, but the cursor can not move to line 3, 4, and 5.

44

Then &list is set, the screen gets corrupted.

55


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11959/1426939276@github.com>

rickhowe

unread,
Feb 13, 2023, 4:12:52 AM2/13/23
to vim/vim, Subscribed

Thanks again, but I still see another problem.

If text is a single character and draw the "below" virtual line.

44

Then &list is set, all the virtual lines are gone.

55

If "above", looks like no problem.

66

And if "below", the problem happens only if text is 1 or 2 characters.

77


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11959/1427589736@github.com>

Bram Moolenaar

unread,
Feb 13, 2023, 10:25:23 AM2/13/23
to vim/vim, Subscribed

I'll have a look at the other problems when I have time.

Note that this issue is already closed, adding more problems to it is confusing.
Next time please open a new issue, with reproduction steps.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11959/1428134304@github.com>

Bram Moolenaar

unread,
May 13, 2023, 10:15:25 AM5/13/23
to vim/vim, Subscribed

Re-opening for the remaining problem mentioned.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11959/1546662638@github.com>

Bram Moolenaar

unread,
May 13, 2023, 10:15:26 AM5/13/23
to vim/vim, Subscribed

Reopened #11959.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11959/issue_event/9238641111@github.com>

Christian Brabandt

unread,
Feb 27, 2024, 2:28:16 PMFeb 27
to vim/vim, Subscribed

Closed #11959 as completed via da0c913.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11959/issue_event/11942152233@github.com>

Reply all
Reply to author
Forward
0 new messages