Skip to content

Commit

Permalink
fix breadcrumbs when there is nonzero lookahead and we're scrolled to…
Browse files Browse the repository at this point in the history
… the top of the document
  • Loading branch information
misson20000 committed May 27, 2024
1 parent 78f1103 commit ac1b6ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/view/listing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ impl Interior {
fn update_breadcrumbs(&self) {
let mut tok = None;

for i in (0..self.scroll.get_lookahead()+1).rev() {
for i in (0..(self.scroll.get_position() as usize) + 1).rev() {
tok = self.window.line_views.get(i).and_then(|l| l.iter_tokens().next());

if tok.is_some() {
Expand Down

0 comments on commit ac1b6ae

Please sign in to comment.