diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-06-28 22:23:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-06-28 22:23:00 +0200 |
commit | 307ac5c68e9e624ab713136d79f35bb73f780d2d (patch) | |
tree | e0d413bd5431690d4331b94cc6a4ab46e0ed2e43 /src/testdir | |
parent | 630afe889a2a02b367ea8eaaa48e66ed81e77ff3 (diff) | |
download | vim-git-307ac5c68e9e624ab713136d79f35bb73f780d2d.tar.gz |
patch 8.1.0126: various problems with 'vartabstop'v8.1.0126
Problem: Various problems with 'vartabstop'.
Solution: Fix memory leak. Fix crash. Add a few more tests. (Christian
Brabandt, closes #3076)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vartabs.vim | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/testdir/test_vartabs.vim b/src/testdir/test_vartabs.vim index 581ff8b9b..c43e17830 100644 --- a/src/testdir/test_vartabs.vim +++ b/src/testdir/test_vartabs.vim @@ -262,21 +262,37 @@ func! Test_vartabs_breakindent() endfunc func! Test_vartabs_linebreak() - if winwidth(0) < 80 + if winwidth(0) < 40 return endif new - 70vnew + 40vnew %d - setl linebreak vartabstop=10,15,20,40 + setl linebreak vartabstop=10,20,30,40 call setline(1, "\tx\tx\tx\tx") - let lines = ScreenLines([1, 2], winwidth(0)) - let expect = [' x x x ', - \ ' x '] + let expect = [' x ', + \ 'x x ', + \ 'x '] + let lines = ScreenLines([1, 3], winwidth(0)) + call s:compare_lines(expect, lines) + setl list listchars=tab:>- + let expect = ['>---------x>------------------ ', + \ 'x>------------------x>------------------', + \ 'x '] + let lines = ScreenLines([1, 3], winwidth(0)) + call s:compare_lines(expect, lines) + setl linebreak vartabstop=40 + let expect = ['>---------------------------------------', + \ 'x>--------------------------------------', + \ 'x>--------------------------------------', + \ 'x>--------------------------------------', + \ 'x '] + let lines = ScreenLines([1, 5], winwidth(0)) call s:compare_lines(expect, lines) " cleanup bw! bw! + set nolist listchars&vim endfunc |