use buffer position instead of screen position

otherwise, when moving down or right there may be
some errors