Currently, if view.SetCursor is called on an empty view with a y > 0, the x and y values that are passed to view.SetCursorUnrestricted are 0 and -1 respectively which is an invalid point.
This change ensures that if the view is empty, the y value passed to view.SetCursorUnrestricted will be set to 0.
Currently, if
view.SetCursor
is called on an empty view with ay > 0
, thex
andy
values that are passed toview.SetCursorUnrestricted
are0
and-1
respectively which is an invalid point.This change ensures that if the view is empty, the
y
value passed toview.SetCursorUnrestricted
will be set to0
.