Commit 31b9521aeccfbf183e519cec4b6b72f8a1d51ca0
Correctly pad date strings, as they might contain utf-8 characters
sprintf is not utf8-aware and thus the output gets a wrong padding
(correct in terms of bytes, not correct in terms of visible characters).
You can notice this using a german locale (de_DE) and viewing mails
from march (abbreviated "M\xc3\xa4r" in german).
| |   |
| 878 | 878 | |
| 879 | 879 | snippet = t.snippet + (t.snippet.empty? ? "" : "...") |
| 880 | 880 | |
| size_widget_text = sprintf "%#{ @size_widget_width}s", size_widget |
| date_widget_text = sprintf "%#{ @date_widget_width}s", date_widget |
| size_padding = @size_widget_width - size_widget.display_length |
| size_widget_text = sprintf "%#{size_padding}s%s", "", size_widget |
|
| date_padding = @date_widget_width - date_widget.display_length |
| date_widget_text = sprintf "%#{date_padding}s%s", "", date_widget |
| 883 | 886 | |
| 884 | 887 | [ |
| 885 | 888 | [:tagged_color, @tags.tagged?(t) ? ">" : " "], |