Mercurial > vim
diff src/testdir/test_textprop.vim @ 29690:1a9b3c96ed08 v9.0.0185
patch 9.0.0185: virtual text does not show if text prop at same position
Commit: https://github.com/vim/vim/commit/952c9b02f8a7c2386b66ed643eef0acd35e842ae
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 10 16:00:33 2022 +0100
patch 9.0.0185: virtual text does not show if text prop at same position
Problem: Virtual text does not show if tehre is a text prop at same
position. (Ben Jackson)
Solution: Fix the sorting of properties. (closes #10879)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Aug 2022 17:15:02 +0200 |
parents | 1455814702ad |
children | 042f357b455d |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -1334,6 +1334,33 @@ func Test_textprop_nowrap_scrolled() call delete('XtestNowrap') endfunc +func Test_textprop_text_priority() + CheckScreendump + + let lines =<< trim END + call setline(1, "function( call, argument, here )") + + call prop_type_add('one', #{highlight: 'Error'}) + call prop_type_add('two', #{highlight: 'Function'}) + call prop_type_add('three', #{highlight: 'DiffChange'}) + call prop_type_add('arg', #{highlight: 'Search'}) + + call prop_add(1, 27, #{type: 'arg', length: len('here')}) + call prop_add(1, 27, #{type: 'three', text: 'three: '}) + call prop_add(1, 11, #{type: 'one', text: 'one: '}) + call prop_add(1, 11, #{type: 'arg', length: len('call')}) + call prop_add(1, 17, #{type: 'two', text: 'two: '}) + call prop_add(1, 17, #{type: 'arg', length: len('argument')}) + END + call writefile(lines, 'XtestPropPrio') + let buf = RunVimInTerminal('-S XtestPropPrio', {'rows': 5}) + call VerifyScreenDump(buf, 'Test_prop_at_same_pos', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XtestPropPrio') +endfunc + func Test_textprop_with_syntax() CheckScreendump