(&mut self, name: Option<&str>, text: &str)
| 527 | } |
| 528 | |
| 529 | fn load(&mut self, name: Option<&str>, text: &str) { |
| 530 | self.name = name.map(str::to_owned); |
| 531 | self.content = text.lines().map(LineBuffer::from).collect(); |
| 532 | self.dirty = false; |
| 533 | self.viewport_pos = FilePos::default(); |
| 534 | self.file_pos = FilePos::default(); |
| 535 | self.insert_col = 0; |
| 536 | } |
| 537 | |
| 538 | fn name(&self) -> Option<&str> { |
| 539 | self.name.as_deref() |
no outgoing calls