(mcview_moveto_eol): comparison of unsigned expression < 0 fixup.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-07-10 16:47:48 +04:00
parent b37af47023
commit 79b44e6be2

View File

@ -405,7 +405,11 @@ mcview_moveto_eol (mcview_t * view)
else
view->dpy_text_column = eol - bol;
}
view->dpy_text_column = max (0, view->dpy_text_column - view->data_area.width);
if (view->dpy_text_column < (off_t) view->data_area.width)
view->dpy_text_column = 0;
else
view->dpy_text_column = view->dpy_text_column - (off_t) view->data_area.width;
}
mcview_movement_fixups (view, FALSE);
}