Skip to content

Commit

Permalink
fix goto line (#52)
Browse files Browse the repository at this point in the history
the line was off by one.
  • Loading branch information
amtoine authored Apr 15, 2024
1 parent 1d98577 commit 762bc89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub fn handle_key_events(
return Ok(TransitionResult::Continue);
} else if key_event == config.keybindings.navigation.goto_line {
app.mode = Mode::Normal;
navigation::go_up_or_down_in_data(app, Direction::At(n));
navigation::go_up_or_down_in_data(app, Direction::At(n.saturating_sub(1)));
return Ok(TransitionResult::Continue);
}
}
Expand Down

0 comments on commit 762bc89

Please sign in to comment.