Ticket #3245: mcviewer: make goto line 1-based instead of 0-based.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Egmont Koblinger 2014-09-03 13:17:56 +04:00 committed by Andrew Borodin
parent 409d4b4eae
commit ecc4f84788

View File

@ -238,6 +238,9 @@ mcview_dialog_goto (mcview_t * view, off_t * offset)
switch (current_goto_type)
{
case MC_VIEW_GOTO_LINENUM:
/* Line number entered by user is 1-based. */
if (addr > 0)
addr--;
mcview_coord_to_offset (view, offset, addr, 0);
*offset = mcview_bol (view, *offset, 0);
break;