Mercurial > vim
diff src/testdir/test_textprop.vim @ 31113:6ff733178f8b v9.0.0891
patch 9.0.0891: virtual text below after match has wrong highlight
Commit: https://github.com/vim/vim/commit/fc1b2d0961ad963e6337c25efe082f4c526aca5e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 16 22:12:57 2022 +0000
patch 9.0.0891: virtual text below after match has wrong highlight
Problem: Virtual text below after match has wrong highlight.
Solution: Restore search_attr only after the virtual text.
(closes #11446)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Nov 2022 23:15:04 +0100 |
parents | 7678a5c9334a |
children | e2c909e06424 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2709,6 +2709,29 @@ func Test_props_with_text_after_below_tr call StopVimInTerminal(buf) endfunc +func Test_prop_with_text_below_after_match() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + + setline(1, ['vim9script', 'some text']) + set signcolumn=yes + matchaddpos('Search', [[1, 10]]) + prop_type_add('test', {highlight: 'Error'}) + prop_add(1, 0, { + type: 'test', + text: 'The quick brown fox', + text_align: 'below' + }) + END + call writefile(lines, 'XscriptPropsBelow', 'D') + let buf = RunVimInTerminal('-S XscriptPropsBelow', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_with_text_below_after_match_1', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_props_with_text_after_joined() CheckRunVimInTerminal