Mercurial > vim
comparison src/testdir/test_textprop.vim @ 29688:1455814702ad v9.0.0184
patch 9.0.0184: virtual text prop highlight continues after truncation
Commit: https://github.com/vim/vim/commit/1d8844aa59416dd306912b5563b8e928dfd387ba
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 10 13:39:35 2022 +0100
patch 9.0.0184: virtual text prop highlight continues after truncation
Problem: Virtual text prop highlight continues after truncation.
Solution: Recompute the length of attributes.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Aug 2022 14:45:02 +0200 |
parents | 4153e4815b36 |
children | 1a9b3c96ed08 |
comparison
equal
deleted
inserted
replaced
29687:fcd7cc10905b | 29688:1455814702ad |
---|---|
1894 call term_sendkeys(buf, "iasdf asdf asdf asdf asdf as\<Esc>") | 1894 call term_sendkeys(buf, "iasdf asdf asdf asdf asdf as\<Esc>") |
1895 call VerifyScreenDump(buf, 'Test_prop_with_linebreak_2', {}) | 1895 call VerifyScreenDump(buf, 'Test_prop_with_linebreak_2', {}) |
1896 | 1896 |
1897 call StopVimInTerminal(buf) | 1897 call StopVimInTerminal(buf) |
1898 call delete('XscriptPropWithLinebreak') | 1898 call delete('XscriptPropWithLinebreak') |
1899 endfunc | |
1900 | |
1901 func Test_prop_with_wrap() | |
1902 CheckRunVimInTerminal | |
1903 | |
1904 let lines =<< trim END | |
1905 vim9script | |
1906 set linebreak | |
1907 setline(1, 'asdf '->repeat(15)) | |
1908 prop_type_add('test', {highlight: 'Special'}) | |
1909 prop_add(1, 43, {text: 'some virtual text', type: 'test'}) | |
1910 END | |
1911 call writefile(lines, 'XscriptPropWithWrap') | |
1912 let buf = RunVimInTerminal('-S XscriptPropWithWrap', #{rows: 6, cols: 50}) | |
1913 call VerifyScreenDump(buf, 'Test_prop_with_wrap_1', {}) | |
1914 | |
1915 call StopVimInTerminal(buf) | |
1916 call delete('XscriptPropWithWrap') | |
1899 endfunc | 1917 endfunc |
1900 | 1918 |
1901 func Test_prop_after_tab() | 1919 func Test_prop_after_tab() |
1902 CheckRunVimInTerminal | 1920 CheckRunVimInTerminal |
1903 | 1921 |