comparison src/testdir/test_textprop.vim @ 22331:0271c2b8bb35 v8.2.1714

patch 8.2.1714: text properties corrupted with substitute command Commit: https://github.com/vim/vim/commit/8902b31f1b31c117915defc23ac45cdc1f5c671b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 20 21:04:35 2020 +0200 patch 8.2.1714: text properties corrupted with substitute command Problem: Text properties corrupted with substitute command. (Filipe Brandenburger) Solution: Get the changed line again after using u_savesub(). (closes #6984)
author Bram Moolenaar <Bram@vim.org>
date Sun, 20 Sep 2020 21:15:04 +0200
parents 5adb97bf0b32
children 166a0f17b05e
comparison
equal deleted inserted replaced
22330:ca6d4f7199a9 22331:0271c2b8bb35
1130 let expected = [{'id': 0, 'col': 10, 'end': 1, 'type': 'number', 'length': 3, 'start': 1}] 1130 let expected = [{'id': 0, 'col': 10, 'end': 1, 'type': 'number', 'length': 3, 'start': 1}]
1131 call assert_equal(expected, prop_list(1)) 1131 call assert_equal(expected, prop_list(1))
1132 bwipe! 1132 bwipe!
1133 endfunc 1133 endfunc
1134 1134
1135 " This was causing property corruption.
1136 func Test_proptype_substitute3()
1137 new
1138 call setline(1, ['abcxxx', 'def'])
1139 call prop_type_add("test", {"highlight": "Search"})
1140 call prop_add(1, 2, {"end_lnum": 2, "end_col": 2, "type": "test"})
1141 %s/x\+$//
1142 redraw
1143
1144 call prop_type_delete('test')
1145 bwipe!
1146 endfunc
1147
1135 func SaveOptions() 1148 func SaveOptions()
1136 let d = #{tabstop: &tabstop, 1149 let d = #{tabstop: &tabstop,
1137 \ softtabstop: &softtabstop, 1150 \ softtabstop: &softtabstop,
1138 \ shiftwidth: &shiftwidth, 1151 \ shiftwidth: &shiftwidth,
1139 \ expandtab: &expandtab, 1152 \ expandtab: &expandtab,