src/viewer/display.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/viewer/display.c b/src/viewer/display.c
index bf02049..24c9ef4 100644
a
|
b
|
mcview_set_buttonbar (mcview_t * view) |
126 | 126 | } |
127 | 127 | |
128 | 128 | /* --------------------------------------------------------------------------------------------- */ |
| 129 | #define BUF_TRUNC_LEN 5 /* The length of the line displays the file size */ |
129 | 130 | |
130 | 131 | static void |
131 | 132 | mcview_display_status (mcview_t * view) |
… |
… |
mcview_display_status (mcview_t * view) |
134 | 135 | const screen_dimen left = view->status_area.left; |
135 | 136 | const screen_dimen width = view->status_area.width; |
136 | 137 | const screen_dimen height = view->status_area.height; |
137 | | const char *file_label; |
138 | | screen_dimen file_label_width; |
| 138 | const char *file_label; |
139 | 139 | |
140 | 140 | if (height < 1) |
141 | 141 | return; |
… |
… |
mcview_display_status (mcview_t * view) |
145 | 145 | tty_draw_hline (-1, -1, ' ', width); |
146 | 146 | |
147 | 147 | file_label = view->filename ? view->filename : view->command ? view->command : ""; |
148 | | file_label_width = str_term_width1 (file_label) - 2; |
| 148 | |
149 | 149 | if (width > 40) |
150 | 150 | { |
151 | | char buffer[BUF_TINY]; |
| 151 | char buffer[BUF_TRUNC_LEN + 1]; |
152 | 152 | widget_move (view, top, width - 32); |
153 | 153 | if (view->hex_mode) |
154 | 154 | tty_printf ("0x%08" PRIxMAX, (uintmax_t) view->hex_cursor); |
155 | 155 | else |
156 | 156 | { |
157 | | size_trunc_len (buffer, 5, mcview_get_filesize (view), 0, panels_options.kilobyte_si); |
| 157 | size_trunc_len (buffer, BUF_TRUNC_LEN, mcview_get_filesize (view), 0, panels_options.kilobyte_si); |
158 | 158 | tty_printf ("%9" PRIuMAX "/%s%s %s", (uintmax_t) view->dpy_end, |
159 | 159 | buffer, mcview_may_still_grow (view) ? "+" : " ", |
160 | 160 | #ifdef HAVE_CHARSET |