diff --git a/src/viewer/display.c b/src/viewer/display.c
index 00c6ec0..225938b 100644
a
|
b
|
mcview_update_bytes_per_line (mcview_t * view) |
325 | 325 | const screen_dimen cols = view->data_area.width; |
326 | 326 | int bytes; |
327 | 327 | |
328 | | if (cols < 8 + 17) |
| 328 | if (cols < 9 + 17) |
329 | 329 | bytes = 4; |
330 | 330 | else |
331 | | bytes = 4 * ((cols - 8) / ((cols < 80) ? 17 : 18)); |
| 331 | bytes = 4 * ((cols - 9) / ((cols <= 80) ? 17 : 18)); |
332 | 332 | #ifdef HAVE_ASSERT_H |
333 | 333 | assert (bytes != 0); |
334 | 334 | #endif |
diff --git a/src/viewer/hex.c b/src/viewer/hex.c
index ff7d501..e355cfb 100644
a
|
b
|
mcview_display_hex (mcview_t * view) |
137 | 137 | const screen_dimen height = view->data_area.height; |
138 | 138 | const screen_dimen width = view->data_area.width; |
139 | 139 | const int ngroups = view->bytes_per_line / 4; |
140 | | const screen_dimen text_start = 8 + 13 * ngroups + ((width < 80) ? 0 : (ngroups - 1 + 1)); |
141 | 140 | /* 8 characters are used for the file offset, and every hex group |
142 | | * takes 13 characters. On "big" screens, the groups are separated |
143 | | * by an extra vertical line, and there is an extra space before the |
144 | | * text column. |
| 141 | * takes 13 characters. Starting at width of 80 columns, the groups |
| 142 | * are separated by an extra vertical line. Starting at width of 81, |
| 143 | * there is an extra space before the text column. There is always a |
| 144 | * mostly empty column on the right, to allow overflowing CJKs. |
145 | 145 | */ |
| 146 | const screen_dimen text_start = 8 + 13 * ngroups + |
| 147 | ((width < 80) ? 0 : (width == 80) ? (ngroups - 1) : (ngroups - 1 + 1)); |
146 | 148 | |
147 | 149 | screen_dimen row; |
148 | 150 | off_t from; |