diff --git a/edit.js b/edit.js index 56e93243..6726ca8b 100644 --- a/edit.js +++ b/edit.js @@ -579,6 +579,9 @@ function setupGlobalSearch() { if (cm.state.search) { return cm.state.search; } + if (!curState) { + return null; + } newState = curState; } cm.state.search = {