comparison 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
comparison
equal deleted inserted replaced
30256:15bee6545058 30257:45788c16b3a5
2890 call VerifyScreenDump(buf, 'Test_prop_with_text_above_8', {}) 2890 call VerifyScreenDump(buf, 'Test_prop_with_text_above_8', {})
2891 2891
2892 call StopVimInTerminal(buf) 2892 call StopVimInTerminal(buf)
2893 endfunc 2893 endfunc
2894 2894
2895 func Test_prop_above_with_indent()
2896 new
2897 call setline(1, ['first line', ' second line', ' line below'])
2898 setlocal cindent
2899 call prop_type_add('indented', #{highlight: 'Search'})
2900 call prop_add(3, 0, #{type: 'indented', text: 'here', text_align: 'above', text_padding_left: 4})
2901 call assert_equal(' line below', getline(3))
2902
2903 exe "normal 3G2|a\<CR>"
2904 call assert_equal(' ', getline(3))
2905 call assert_equal(' line below', getline(4))
2906
2907 bwipe!
2908 call prop_type_delete('indented')
2909 endfunc
2910
2895 func Test_props_with_text_override() 2911 func Test_props_with_text_override()
2896 CheckRunVimInTerminal 2912 CheckRunVimInTerminal
2897 2913
2898 let lines =<< trim END 2914 let lines =<< trim END
2899 vim9script 2915 vim9script