From 36ceda276a1b6294873e00879cb1f5a18e11311d Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 30 Jul 2015 01:19:32 +0300 Subject: [PATCH] CodeMirror.fromTextArea() speedup --- codemirror/lib/codemirror.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {