Skip to content

Commit

Permalink
Update view.go
Browse files Browse the repository at this point in the history
Co-authored-by: dankox <[email protected]>
  • Loading branch information
mjarkk and dankox authored Feb 26, 2021
1 parent 76af00f commit 3a4e596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion view.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (v *View) setRune(x, y int, ch rune, fgColor, bgColor Attribute) error {
// y < total lines && y > 0
// (x < view width || x < y's line width) && x > 0
func (v *View) SetCursor(x, y int) error {
if x < 0 || y < 0 || (y >= len(v.lines) && y != 0) || (x > 0 && (len(v.lines) == 0 || len(v.lines[y]) >= x)) {
if x < 0 || y < 0 || (y >= len(v.lines) && y != 0) || (x > 0 && (len(v.lines) == 0 || len(v.lines[y]) < x)) {
return ErrInvalidPoint
}

Expand Down

0 comments on commit 3a4e596

Please sign in to comment.