Skip to content

Commit 612db45

Browse files
committed
[python mode] Fix indentation tracking
Issue codemirror#3794
1 parent 10ad16c commit 612db45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/python/python.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@
8585

8686
// tokenizers
8787
function tokenBase(stream, state) {
88+
if (stream.sol()) state.indent = stream.indentation()
8889
// Handle scope changes
8990
if (stream.sol() && top(state).type == "py") {
90-
state.indent = stream.indentation()
9191
var scopeOffset = top(state).offset;
9292
if (stream.eatSpace()) {
9393
var lineOffset = stream.indentation();

0 commit comments

Comments
 (0)