Mercurial > vim
diff src/testdir/test_textprop.vim @ 30257:45788c16b3a5 v9.0.0464
patch 9.0.0464: with virtual text "above" indenting doesn't work well
Commit: https://github.com/vim/vim/commit/702bd6c7c61073c0907fd7608911aebee4acd337
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 14 16:09:57 2022 +0100
patch 9.0.0464: with virtual text "above" indenting doesn't work well
Problem: With virtual text "above" indenting doesn't work well.
Solution: Ignore text properties while adjusting indent. (issue https://github.com/vim/vim/issues/11084)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 14 Sep 2022 17:15:06 +0200 |
parents | 8f85b5c45432 |
children | 6b658ef69e93 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2892,6 +2892,22 @@ func Test_props_with_text_above() call StopVimInTerminal(buf) endfunc +func Test_prop_above_with_indent() + new + call setline(1, ['first line', ' second line', ' line below']) + setlocal cindent + call prop_type_add('indented', #{highlight: 'Search'}) + call prop_add(3, 0, #{type: 'indented', text: 'here', text_align: 'above', text_padding_left: 4}) + call assert_equal(' line below', getline(3)) + + exe "normal 3G2|a\<CR>" + call assert_equal(' ', getline(3)) + call assert_equal(' line below', getline(4)) + + bwipe! + call prop_type_delete('indented') +endfunc + func Test_props_with_text_override() CheckRunVimInTerminal