Mercurial > vim
comparison src/testdir/test_textprop.vim @ 16670:5733d8e33bce v8.1.1337
patch 8.1.1337: get empty text prop when splitting line just after text prop
commit https://github.com/vim/vim/commit/5c65e6a062dfc7d20931fa1f73d03b1714a4d5e1
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 17 11:08:56 2019 +0200
patch 8.1.1337: get empty text prop when splitting line just after text prop
Problem: Get empty text prop when splitting line just after text prop.
Solution: Do not create an empty text prop at the start of the line.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 17 May 2019 11:15:06 +0200 |
parents | 1fc9cd08cf3c |
children | 79c5f723bb5d |
comparison
equal
deleted
inserted
replaced
16669:e4bdd8a2b0c2 | 16670:5733d8e33bce |
---|---|
314 let expected[0].length = 2 | 314 let expected[0].length = 2 |
315 let expected[1].col -= 2 | 315 let expected[1].col -= 2 |
316 call assert_equal(expected, prop_list(2)) | 316 call assert_equal(expected, prop_list(2)) |
317 call DeletePropTypes() | 317 call DeletePropTypes() |
318 | 318 |
319 " split just after first prop, empty prop and second prop move to next line | 319 " split just after first prop, second prop move to next line |
320 let expected = SetupOneLine() " 'xonex xtwoxx' | 320 let expected = SetupOneLine() " 'xonex xtwoxx' |
321 exe "normal 0fea\<CR>\<Esc>" | 321 exe "normal 0fea\<CR>\<Esc>" |
322 call assert_equal('xone', getline(1)) | 322 call assert_equal('xone', getline(1)) |
323 call assert_equal('x xtwoxx', getline(2)) | 323 call assert_equal('x xtwoxx', getline(2)) |
324 let exp_first = expected[0:0] | 324 let exp_first = expected[0:0] |
325 call assert_equal(exp_first, prop_list(1)) | 325 call assert_equal(exp_first, prop_list(1)) |
326 let expected[0].col = 1 | 326 let expected = expected[1:1] |
327 let expected[0].length = 0 | 327 let expected[0].col -= 4 |
328 let expected[1].col -= 4 | |
329 call assert_equal(expected, prop_list(2)) | 328 call assert_equal(expected, prop_list(2)) |
330 call DeletePropTypes() | 329 call DeletePropTypes() |
331 | 330 |
332 bwipe! | 331 bwipe! |
333 set bs& | 332 set bs& |