comparison src/testdir/test_textprop.vim @ 25672:ab42c36d1a27 v8.2.3372

patch 8.2.3372: line2byte() value wrong when adding a text property Commit: https://github.com/vim/vim/commit/cdd8a5e6fe089a3b1370ac940d06fc3cefc6f8f2 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 25 16:40:03 2021 +0200 patch 8.2.3372: line2byte() value wrong when adding a text property Problem: line2byte() value wrong when adding a text property. (Yuto Kimura) Solution: Adjust length for text property. (closes https://github.com/vim/vim/issues/8772) Also fix it for deleting a line.
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Aug 2021 16:45:03 +0200
parents 78ef12e0ce8c
children 1d14b5d3de17
comparison
equal deleted inserted replaced
25671:215c114b0274 25672:ab42c36d1a27
853 call prop_add(2, 1, {'type': 'comment'}) 853 call prop_add(2, 1, {'type': 'comment'})
854 call prop_add(222, 1, {'type': 'comment'}) 854 call prop_add(222, 1, {'type': 'comment'})
855 call assert_equal(1491, line2byte(401)) 855 call assert_equal(1491, line2byte(401))
856 call prop_remove({'type': 'comment'}) 856 call prop_remove({'type': 'comment'})
857 call assert_equal(1491, line2byte(401)) 857 call assert_equal(1491, line2byte(401))
858 bwipe!
859
860 new
861 call setline(1, range(520))
862 call assert_equal(1491, line2byte(401))
863 call prop_add(2, 1, {'type': 'comment'})
864 call assert_equal(1491, line2byte(401))
865 2delete
866 call assert_equal(1489, line2byte(400))
858 bwipe! 867 bwipe!
859 868
860 call prop_type_delete('comment') 869 call prop_type_delete('comment')
861 endfunc 870 endfunc
862 871