Fix frame cursor functions ignoring stack

This commit is contained in:
Joscha 2022-07-23 22:24:28 +02:00
parent 53b2728c82
commit c1907bb8ee
2 changed files with 11 additions and 3 deletions

View file

@ -44,11 +44,11 @@ impl Frame {
}
pub fn cursor(&self) -> Option<Pos> {
self.cursor
self.cursor.map(|p| self.buffer.global_to_local(p))
}
pub fn set_cursor(&mut self, pos: Option<Pos>) {
self.cursor = pos;
self.cursor = pos.map(|p| self.buffer.local_to_global(p));
}
pub fn show_cursor(&mut self, pos: Pos) {