Fix prompt_start_row reset to 0 after output without CR (#688)

This commit is contained in:
nibon7 2023-12-24 00:52:40 +08:00 committed by GitHub
parent a4bfaa512b
commit e097b88dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
};