diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-02 17:14:56 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-02 17:14:56 +0200 |
| commit | 29ab8b40dc6976687ffb8bfbf663314b0ec3c46e (patch) | |
| tree | c1bf41eae365a8d3eda5831fd4dfaa71e733c6ed /src/state | |
| parent | 91f967ed289918bbbd6d7ae1b992132b6f7cb084 (diff) | |
fix view cursor boundry
Diffstat (limited to 'src/state')
| -rw-r--r-- | src/state/view/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |