fix: fixes #130 by adding overflowing_sub
This commit is contained in:
parent
c7db38d0c5
commit
a1febb52bd
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::collections::VecDeque;
|
||||
use std::{collections::VecDeque};
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
|
||||
use crate::terminal_pane::terminal_character::{
|
||||
|
|
@ -266,7 +266,7 @@ impl CursorPosition {
|
|||
self.column_index += count;
|
||||
}
|
||||
pub fn move_backwards(&mut self, count: usize) {
|
||||
self.column_index -= count;
|
||||
self.column_index = u32::overflowing_sub(self.column_index as u32, count as u32).0 as usize;
|
||||
}
|
||||
pub fn move_to_next_linewrap(&mut self) {
|
||||
self.line_index.1 += 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue