diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-02-09 10:45:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 10:45:32 +0100 |
commit | 1ece24a329806778230034da73c25cc434b3bc9d (patch) | |
tree | d50cc55fc7face5d8d59c96f3b51f4a0e735f724 /test/functional/ui/multibyte_spec.lua | |
parent | dd8b29cfe25604c062b76bb3a9347c5d740365ba (diff) | |
parent | 70c212e4808ca36279c65b630ff1d231e75349d3 (diff) | |
download | rneovim-1ece24a329806778230034da73c25cc434b3bc9d.tar.gz rneovim-1ece24a329806778230034da73c25cc434b3bc9d.tar.bz2 rneovim-1ece24a329806778230034da73c25cc434b3bc9d.zip |
Merge pull request #11836 from bfredl/vim-dbe5d361feb6
vim-patch:8.2.0235: draw error when an empty group is removed from 'statusline'
Diffstat (limited to 'test/functional/ui/multibyte_spec.lua')
-rw-r--r-- | test/functional/ui/multibyte_spec.lua | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/test/functional/ui/multibyte_spec.lua b/test/functional/ui/multibyte_spec.lua index 8122cb08a3..e6a79feadc 100644 --- a/test/functional/ui/multibyte_spec.lua +++ b/test/functional/ui/multibyte_spec.lua @@ -123,6 +123,10 @@ describe('multibyte rendering: statusline', function() before_each(function() clear() screen = Screen.new(40, 4) + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue1}, + [2] = {bold = true, reverse = true}, + }) screen:attach() command('set laststatus=2') end) @@ -131,8 +135,8 @@ describe('multibyte rendering: statusline', function() command('set statusline=你好') screen:expect([[ ^ | - ~ | - 你好 | + {1:~ }| + {2:你好 }| | ]]) end) @@ -140,8 +144,8 @@ describe('multibyte rendering: statusline', function() command('set statusline=abc') screen:expect([[ ^ | - ~ | - abc | + {1:~ }| + {2:abc }| | ]]) end) @@ -149,8 +153,8 @@ describe('multibyte rendering: statusline', function() command('set statusline=') screen:expect([[ ^ | - ~ | - <9f> | + {1:~ }| + {2:<9f> }| | ]]) end) @@ -159,8 +163,8 @@ describe('multibyte rendering: statusline', function() -- o + U+1DF0 + U+20EF + U+0338 + U+20D0 + U+20E7 + U+20DD screen:expect([[ ^ | - ~ | - o̸⃯ᷰ⃐⃧⃝ | + {1:~ }| + {2:o̸⃯ᷰ⃐⃧⃝ }| | ]]) end) @@ -169,9 +173,19 @@ describe('multibyte rendering: statusline', function() -- U+9F + U+1DF0 + U+20EF + U+0338 + U+20D0 + U+20E7 + U+20DD screen:expect([[ ^ | - ~ | - <9f><1df0><20ef><0338><20d0><20e7><20dd>| + {1:~ }| + {2:<9f><1df0><20ef><0338><20d0><20e7><20dd>}| | ]]) end) + + it('hidden group %( %) does not cause invalid unicode', function() + command("let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡'") + screen:expect{grid=[[ + ^ | + {1:~ }| + {2: Q≡ }| + | + ]]} + end) end) |