Skip to content

Commit

Permalink
fix(ansi): mouse sgr coordinates are 1-based
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 15, 2024
1 parent 854ee22 commit 44b28d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansi/mouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ func MouseSgr(b byte, x, y int, release bool) string {
if release {
s = "m"
}
return fmt.Sprintf("\x1b[<%d;%d;%d%s", b, x, y, s)
return fmt.Sprintf("\x1b[<%d;%d;%d%s", b, x+1, y+1, s)
}

0 comments on commit 44b28d5

Please sign in to comment.