truncate status messages when too long (#509)

Co-authored-by: Zach Bodi <zbodi@hubspot.com>
This commit is contained in:
Ellie Bodi 2023-06-09 22:19:54 -07:00 committed by GitHub
parent 8597d57fb4
commit dbb8a403e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,8 @@ local URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9+-.]*)://.*'
local status_callback = function(_, result)
api.nvim_command(string.format(':echohl Function | echo "%s" | echohl None', result.message))
api.nvim_command(string.format(':echohl Function | echo "%s" | echohl None',
string.sub(result.message, 1, vim.v.echospace)))
end