parts: error when unsing non-utf8 encoding

use exprission string "\u2026" instead of literal …

fixes #2666
This commit is contained in:
Christian Brabandt 2024-02-17 15:28:04 +01:00
parent 20a49bd494
commit d9f42cb467
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -191,7 +191,7 @@ endfunction
function! airline#parts#filetype()
return (airline#util#winwidth() < 90 && strlen(&filetype) > 3)
\ ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? '…' : '>')
\ ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? "\u2026" : '>')
\ : &filetype
endfunction