Mercurial > vim
diff src/testdir/test_textprop.vim @ 31469:c097c18dcedb v9.0.1067
patch 9.0.1067: in diff mode virtual text is highlighted incorrectly
Commit: https://github.com/vim/vim/commit/d097af77797f030e0f29f9bbc298358a5addb2a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 17 11:33:00 2022 +0000
patch 9.0.1067: in diff mode virtual text is highlighted incorrectly
Problem: In diff mode virtual text is highlighted incorrectly. (Rick Howe)
Solution: Do not use diff attributes for virtual text. (closes https://github.com/vim/vim/issues/11714)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Dec 2022 12:45:03 +0100 |
parents | 1c43d8bad31d |
children | 966c87c57912 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -3696,5 +3696,35 @@ func Test_text_prop_delete_updates() call StopVimInTerminal(buf) endfunc +func Test_text_prop_diff_mode() + CheckRunVimInTerminal + + let lines =<< trim END + call setline(1, ['9000', '0009', '0009', '9000', '0009']) + + let type = 'test' + call prop_type_add(type, {}) + let text = '<text>' + call prop_add(1, 1, {'type': type, 'text': text}) + call prop_add(2, 0, {'type': type, 'text': text, 'text_align': 'after'}) + call prop_add(3, 0, {'type': type, 'text': text, 'text_align': 'right'}) + call prop_add(4, 0, {'type': type, 'text': text, 'text_align': 'above'}) + call prop_add(5, 0, {'type': type, 'text': text, 'text_align': 'below'}) + set diff + + vnew + call setline(1, ['000', '000', '000', '000', '000']) + set diff + END + call writefile(lines, 'XtextPropDiff', 'D') + let buf = RunVimInTerminal('-S XtextPropDiff', #{rows: 10, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_diff_mode_1', {}) + + call term_sendkeys(buf, ":windo set number\<CR>") + call VerifyScreenDump(buf, 'Test_prop_diff_mode_2', {}) + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab