- (if backward
- (or (text-property-not-all found beg-found 'invisible nil)
- (text-property-not-all found beg-found 'display nil))
- (or (text-property-not-all beg-found found 'invisible nil)
- (text-property-not-all beg-found found 'display nil)))
+ (and (not (eq search-invisible t))
+ (if backward
+ (or (text-property-not-all found beg-found 'invisible nil)
+ (text-property-not-all found beg-found 'display nil))
+ (or (text-property-not-all beg-found found 'invisible nil)
+ (text-property-not-all beg-found found 'display nil))))