fix insert
This commit is contained in:
parent
916360671a
commit
fde859a48a
1 changed files with 2 additions and 2 deletions
|
@ -73,8 +73,8 @@ impl Buffer {
|
|||
self.has_changed = true;
|
||||
match addr {
|
||||
Address::Actual | Address::Empty => self.insert_buffer(self.current_line, lines),
|
||||
Address::Line(l) => self.insert_buffer(l, lines),
|
||||
Address::Last => self.insert_buffer(self.buffer.len(), lines),
|
||||
Address::Line(l) => self.insert_buffer(l.saturating_sub(1), lines),
|
||||
Address::Last => self.insert_buffer(self.buffer.len().saturating_sub(1), lines),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue