Simplify some logic in cursor search, no real change.