Skip to content

Commit

Permalink
Fix prompt_start_row reset to 0 when opening a file without newline in
Browse files Browse the repository at this point in the history
Nushell
  • Loading branch information
nibon7 committed Dec 23, 2023
1 parent a4bfaa5 commit ae68d9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/painting/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Painter {

// This might not be terribly performant. Testing it out
let is_reset = || match cursor::position() {
Ok(position) => position.1 < self.prompt_start_row,
Ok(position) => position.1.abs_diff(self.prompt_start_row) > 1,
Err(_) => false,
};

Check warning on line 158 in src/painting/painter.rs

View check run for this annotation

Codecov / codecov/patch

src/painting/painter.rs#L154-L158

Added lines #L154 - L158 were not covered by tests

Expand Down

0 comments on commit ae68d9b

Please sign in to comment.