From 29ab8b40dc6976687ffb8bfbf663314b0ec3c46e Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Fri, 2 Aug 2024 17:14:56 +0200 Subject: fix view cursor boundry --- src/state/view/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/state') diff --git a/src/state/view/mod.rs b/src/state/view/mod.rs index e45a3f4..1825128 100644 --- a/src/state/view/mod.rs +++ b/src/state/view/mod.rs @@ -41,8 +41,8 @@ impl SheetViewState { if let Some(id) = sheet { if let Some(lock) = Register::get(id) { let sheet = lock.read().unwrap(); - self.cursor.set_x_max(sheet.width()); - self.cursor.set_y_max(sheet.height()); + self.cursor.set_x_max(sheet.width() - 1); + self.cursor.set_y_max(sheet.height() - 1); } } -- cgit v1.2.3-70-g09d2