Mercurial > vim
diff src/testdir/test_textprop.vim @ 29736:65348cc3b656 v9.0.0208
patch 9.0.0208: the override flag has no effect for virtual text
Commit: https://github.com/vim/vim/commit/9e7e28fc4c32337f2153b94fb08140f47e46e35d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 14 16:36:38 2022 +0100
patch 9.0.0208: the override flag has no effect for virtual text
Problem: The override flag has no effect for virtual text. (Ben Jackson)
Solution: Make the override flag work. (closes https://github.com/vim/vim/issues/10915)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 14 Aug 2022 17:45:03 +0200 |
parents | 0eeab24d3faf |
children | b167c91b5f6b |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2805,6 +2805,30 @@ func Test_props_with_text_below_nowrap() call delete('XscriptPropsBelowNowrap') endfunc +func Test_props_with_text_override() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + setline(1, 'some text here') + hi Likethis ctermfg=blue ctermbg=cyan + prop_type_add('prop', {highlight: 'Likethis', override: true}) + prop_add(1, 6, {type: 'prop', text: ' inserted '}) + hi CursorLine cterm=underline ctermbg=lightgrey + set cursorline + END + call writefile(lines, 'XscriptPropsOverride') + let buf = RunVimInTerminal('-S XscriptPropsOverride', #{rows: 6, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_with_text_override_1', {}) + + call term_sendkeys(buf, ":set nocursorline\<CR>") + call term_sendkeys(buf, "0llvfr") + call VerifyScreenDump(buf, 'Test_prop_with_text_override_2', {}) + + call StopVimInTerminal(buf) + call delete('XscriptPropsOverride') +endfunc + func Test_props_with_text_CursorMoved() CheckRunVimInTerminal