Update search.cpp

modify only move condition