Fix #2452 - Strip trailing spaces off sign text automatically

This commit is contained in:
w0rp 2019-04-23 15:58:10 +01:00
parent fcc2c3ba71
commit 893ac34cca
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83

View File

@ -66,7 +66,7 @@ endif
" Spaces and backslashes need to be escaped for signs.
function! s:EscapeSignText(sign_text) abort
return substitute(a:sign_text, '\\\| ', '\\\0', 'g')
return substitute(substitute(a:sign_text, ' *$', '', ''), '\\\| ', '\\\0', 'g')
endfunction
" Signs show up on the left for error markers.