Skip to content

Commit a8f5286

Browse files
mtaran-googlemarijnh
authored andcommitted
[runmode] Export countColumn on the minimal CodeMirror
This is needed e.g. for the google-modes to produce correct indentation.
1 parent 123c670 commit a8f5286

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/addon/runmode/codemirror-standalone.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import StringStream from "../../util/StringStream.js"
2+
import { countColumn } from "../../util/misc.js"
23
import * as modeMethods from "../../modes.js"
34

45
// declare global: globalThis, CodeMirror
@@ -17,6 +18,7 @@ CodeMirror.defineMIME("text/plain", "null")
1718

1819
CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min
1920
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) }
21+
CodeMirror.countColumn = countColumn
2022

2123
CodeMirror.defaults = { indentUnit: 2 }
2224
export default CodeMirror

0 commit comments

Comments
 (0)