fix CodeMirror search failing with RegExp syntax

Commit e6b16d80 broke this by trying to access the undefined isRE