diff options
author | watiko <service@mail.watiko.net> | 2016-01-25 03:55:47 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-01-28 20:52:40 +0900 |
commit | d25a59f4d0c357fd4df4adc8e2d60497f742c41a (patch) | |
tree | 48f25822284254efcab157ef515fb4e311a28912 /test | |
parent | 50393ef17831a24a57e68812f9cadf186c650ab9 (diff) | |
download | rneovim-d25a59f4d0c357fd4df4adc8e2d60497f742c41a.tar.gz rneovim-d25a59f4d0c357fd4df4adc8e2d60497f742c41a.tar.bz2 rneovim-d25a59f4d0c357fd4df4adc8e2d60497f742c41a.zip |
vim-patch:7.4.639
Problem: Combination of linebreak and conceal doesn't work well.
Solution: Fix the display problems. (Christian Brabandt)
https://github.com/vim/vim/commit/8fc6bc71266e342d339c851b3ee472357f917597
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/listlbr_utf8_spec.lua | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/test/functional/legacy/listlbr_utf8_spec.lua b/test/functional/legacy/listlbr_utf8_spec.lua index 69e7b87a21..a327ae1857 100644 --- a/test/functional/legacy/listlbr_utf8_spec.lua +++ b/test/functional/legacy/listlbr_utf8_spec.lua @@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers') local source = helpers.source +local feed = helpers.feed local clear, expect = helpers.clear, helpers.expect describe('linebreak', function() @@ -61,6 +62,43 @@ describe('linebreak', function() redraw! let line=ScreenChar(winwidth(0),7) call DoRecordScreen() + let g:test ="Test 5: set linebreak list listchars and concealing part2" + let c_defines=['bbeeeeee ; some text'] + call append('$', c_defines) + $ + norm! zt + set nowrap ts=2 list linebreak listchars=tab:>- cole=2 concealcursor=n + syn clear + syn match meaning /;\s*\zs.*/ + syn match hasword /^\x\{8}/ contains=word + syn match word /\<\x\{8}\>/ contains=beginword,endword contained + syn match beginword /\<\x\x/ contained conceal + syn match endword /\x\{6}\>/ contained + hi meaning guibg=blue + hi beginword guibg=green + hi endword guibg=red + redraw! + let line=ScreenChar(winwidth(0),1) + call DoRecordScreen() + let g:test ="Test 6: Screenattributes for comment" + $put =g:test + call append('$', ' /* and some more */') + exe "set ft=c ts=7 linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6" + syntax on + hi SpecialKey term=underline ctermfg=red guifg=red + let attr=[] + nnoremap <expr> GG ":let attr += ['".screenattr(screenrow(),screencol())."']\n" + $ + norm! zt0 + ]]) + feed('GGlGGlGGlGGlGGlGGlGGlGGlGGlGGl') + source([[ + call append('$', ['ScreenAttributes for test6:']) + if attr[0] != attr[1] && attr[1] != attr[3] && attr[3] != attr[5] + call append('$', "Attribut 0 and 1 and 3 and 5 are different!") + else + call append('$', "Not all attributes are different") + endif ]]) -- Assert buffer contents. @@ -102,6 +140,14 @@ describe('linebreak', function() #define >CDEFGH>----1 #define >_FILE>--------->--->---1 #define >_CONSOLE>---------->---2 - #define >_FILE_AND_CONSOLE>---------3 ]]) + #define >_FILE_AND_CONSOLE>---------3 + bbeeeeee ; some text + + Test 5: set linebreak list listchars and concealing part2 + eeeeee>--->-;>some text + Test 6: Screenattributes for comment + /* and some more */ + ScreenAttributes for test6: + Attribut 0 and 1 and 3 and 5 are different!]]) end) end) |