Mercurial > vim
diff src/testdir/test_textprop.vim @ 31938:96d6d31dd66b v9.0.1301
patch 9.0.1301: virtual text below empty line not displayed
Commit: https://github.com/vim/vim/commit/9d9a20ee8799bafe9caac616fef11b7a26db6a8d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 11 13:49:01 2023 +0000
patch 9.0.1301: virtual text below empty line not displayed
Problem: Virtual text below empty line not displayed.
Solution: Adjust flags and computations. (closes https://github.com/vim/vim/issues/11959)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 11 Feb 2023 15:00:04 +0100 |
parents | dbec60b8c253 |
children | 87ed5e064db2 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2779,6 +2779,28 @@ func Test_prop_with_text_below_after_emp call StopVimInTerminal(buf) endfunc +func Test_prop_with_text_above_below_empty() + CheckRunVimInTerminal + + let lines =<< trim END + setlocal number + call setline(1, ['11111111', '', '333333333', '', '55555555555']) + + let vt = 'test' + 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 + normal G + END + call writefile(lines, 'XscriptPropAboveBelowEmpty', 'D') + let buf = RunVimInTerminal('-S XscriptPropAboveBelowEmpty', #{rows: 16, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_above_below_empty_1', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_prop_with_text_below_after_match() CheckRunVimInTerminal