diff options
| author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-05 14:09:28 +0200 |
|---|---|---|
| committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-05 14:09:28 +0200 |
| commit | 6dbbd0b25f8b436255101b5f3a424a078ffdff72 (patch) | |
| tree | 24fbc2383d3d2cf64655c6ec120feebcb5faf23e | |
| parent | Also handle numpad's enter key (diff) | |
editor: fix off-by-one error
when writing on the last cell of the row
| -rw-r--r-- | ui/editor.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/editor.go b/ui/editor.go index c735e48..164a73a 100644 --- a/ui/editor.go +++ b/ui/editor.go @@ -100,7 +100,7 @@ func (e *editor) Right() { return } e.cursorIdx++ - if e.width < e.textWidth[e.cursorIdx]-e.textWidth[e.offsetIdx] { + if e.width <= e.textWidth[e.cursorIdx]-e.textWidth[e.offsetIdx] { e.offsetIdx += 16 max := len(e.text) - 1 if max < e.offsetIdx { |
