mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
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:
parent
409d4b4eae
commit
ecc4f84788
@ -238,6 +238,9 @@ mcview_dialog_goto (mcview_t * view, off_t * offset)
|
|||||||
switch (current_goto_type)
|
switch (current_goto_type)
|
||||||
{
|
{
|
||||||
case MC_VIEW_GOTO_LINENUM:
|
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);
|
mcview_coord_to_offset (view, offset, addr, 0);
|
||||||
*offset = mcview_bol (view, *offset, 0);
|
*offset = mcview_bol (view, *offset, 0);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user