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;
|
self.has_changed = true;
|
||||||
match addr {
|
match addr {
|
||||||
Address::Actual | Address::Empty => self.insert_buffer(self.current_line, lines),
|
Address::Actual | Address::Empty => self.insert_buffer(self.current_line, lines),
|
||||||
Address::Line(l) => self.insert_buffer(l, lines),
|
Address::Line(l) => self.insert_buffer(l.saturating_sub(1), lines),
|
||||||
Address::Last => self.insert_buffer(self.buffer.len(), lines),
|
Address::Last => self.insert_buffer(self.buffer.len().saturating_sub(1), lines),
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue