diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-02-14 18:51:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 18:51:56 +0100 |
commit | 9a9a4d38a8091eeb1b1acee1c086313d97c4fd8a (patch) | |
tree | b1e0fe82bd2a5dd0cd1b888e98cb483ec6f370d1 /test | |
parent | 264fb6945baed20b1f1ef4302ccd8a41e37b088e (diff) | |
parent | 39f8aaeb815c2e31cffec12ef36ad4f25df91602 (diff) | |
download | rneovim-9a9a4d38a8091eeb1b1acee1c086313d97c4fd8a.tar.gz rneovim-9a9a4d38a8091eeb1b1acee1c086313d97c4fd8a.tar.bz2 rneovim-9a9a4d38a8091eeb1b1acee1c086313d97c4fd8a.zip |
Merge pull request #11756 from bfredl/crashfix
custom statusline crash containing unprintable unicode
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/multibyte_spec.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/ui/multibyte_spec.lua b/test/functional/ui/multibyte_spec.lua index d4e237bcb4..9f413f8bff 100644 --- a/test/functional/ui/multibyte_spec.lua +++ b/test/functional/ui/multibyte_spec.lua @@ -158,6 +158,7 @@ describe('multibyte rendering: statusline', function() screen:set_default_attr_ids({ [1] = {bold = true, foreground = Screen.colors.Blue1}, [2] = {bold = true, reverse = true}, + [3] = {background = Screen.colors.Red, foreground = Screen.colors.Gray100}; }) screen:attach() command('set laststatus=2') @@ -220,4 +221,27 @@ describe('multibyte rendering: statusline', function() | ]]} end) + + it('unprintable chars in filename with default stl', function() + command("file 🧑💻") + -- TODO: this is wrong but avoids a crash + screen:expect{grid=[[ + ^ | + {1:~ }| + {2:🧑�💻 }| + | + ]]} + end) + + it('unprintable chars in filename with custom stl', function() + command('set statusline=xx%#ErrorMsg#%f%##yy') + command("file 🧑💻") + -- TODO: this is also wrong but also avoids a crash + screen:expect{grid=[[ + ^ | + {1:~ }| + {2:xx}{3:🧑<200d>💻}{2:yy }| + | + ]]} + end) end) |