Fix scrolling with cursor

This commit is contained in:
Jeremy Soller 2022-10-25 20:49:15 -06:00
parent c031944b45
commit e53956cb2d
4 changed files with 29 additions and 24 deletions

View file

@ -157,7 +157,12 @@ where
let mut buffer = self.buffer.lock().unwrap();
let mut cache = self.cache.lock().unwrap();
buffer.shape_until_cursor();
if buffer.cursor_moved {
buffer.shape_until_cursor();
buffer.cursor_moved = false;
} else {
buffer.shape_until_scroll();
}
let buffer_x = layout.bounds().x;
let buffer_y = layout.bounds().y;