Minor optimization of MC viewer.
Call mcview_compute_areas() not so often. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
8c84095ae1
Коммит
962dd4d81f
@ -230,7 +230,6 @@ mcview_update (mcview_t * view)
|
||||
void
|
||||
mcview_display (mcview_t * view)
|
||||
{
|
||||
mcview_compute_areas (view);
|
||||
if (view->hex_mode) {
|
||||
mcview_display_hex (view);
|
||||
} else if (view->text_nroff_mode) {
|
||||
@ -291,10 +290,8 @@ mcview_compute_areas (mcview_t * view)
|
||||
view->data_area.top = y;
|
||||
y += view->data_area.height;
|
||||
|
||||
if (ruler == RULER_BOTTOM) {
|
||||
if (ruler == RULER_BOTTOM)
|
||||
view->ruler_area.top = y;
|
||||
y += view->ruler_area.height;
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -376,7 +376,8 @@ mcview_load (mcview_t * view, const char *command, const char *file, int start_l
|
||||
view->dpy_text_column = 0;
|
||||
|
||||
mcview_compute_areas (view);
|
||||
assert (view->bytes_per_line != 0);
|
||||
mcview_update_bytes_per_line (view);
|
||||
|
||||
if (mcview_remember_file_position && view->filename != NULL && start_line == 0) {
|
||||
long line, col;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user