fix line scroll decision
use min/max in cursor moving