diff --git a/codemirror/lib/codemirror.js b/codemirror/lib/codemirror.js index 3363179f..25130925 100644 --- a/codemirror/lib/codemirror.js +++ b/codemirror/lib/codemirror.js @@ -318,7 +318,7 @@ } } gutters.style.display = i ? "" : "none"; - updateGutterSpace(cm); + setTimeout(updateGutterSpace.bind(null, cm), 0); } function updateGutterSpace(cm) {