From 0a1c8bb26f313cb2fb6157b47424b972a2cedc7c Mon Sep 17 00:00:00 2001 From: "Mr.tang" <1074461480@qq.com> Date: Fri, 16 Feb 2018 10:56:44 -0600 Subject: [PATCH] enhance cm (#547) --- client/modules/IDE/components/Editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index b8088996..2a303fce 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -181,7 +181,7 @@ class Editor extends React.Component { if (prevProps.consoleEvents !== this.props.consoleEvents) { this.props.showRuntimeErrorWarning(); } - for (let i = 0; i < 1000; i += 1) { + for (let i = 0; i < this._cm.lineCount(); i += 1) { this._cm.removeLineClass(i, 'background', 'line-runtime-error'); } if (this.props.runtimeErrorWarningVisible) {