Skip to content

Commit 4e7e863

Browse files
committed
Remove a few unneccesary property accesses
1 parent dff9738 commit 4e7e863

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/codemirror.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,7 +3815,7 @@
38153815
if (how == "smart") {
38163816
// Fall back to "prev" when the mode doesn't have an indentation
38173817
// method.
3818-
if (!cm.doc.mode.indent) how = "prev";
3818+
if (!doc.mode.indent) how = "prev";
38193819
else state = getStateBefore(cm, n);
38203820
}
38213821

@@ -3827,7 +3827,7 @@
38273827
indentation = 0;
38283828
how = "not";
38293829
} else if (how == "smart") {
3830-
indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
3830+
indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
38313831
if (indentation == Pass || indentation > 150) {
38323832
if (!aggressive) return;
38333833
how = "prev";
@@ -3851,7 +3851,7 @@
38513851
if (pos < indentation) indentString += spaceStr(indentation - pos);
38523852

38533853
if (indentString != curSpaceString) {
3854-
replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
3854+
replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
38553855
} else {
38563856
// Ensure that, if the cursor was in the whitespace at the start
38573857
// of the line, it is moved to the end of that space.

0 commit comments

Comments
 (0)