summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/python/python.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/vendor/codemirror/mode/python/python.js')
-rw-r--r--public/vendor/codemirror/mode/python/python.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/vendor/codemirror/mode/python/python.js b/public/vendor/codemirror/mode/python/python.js
index ec662b1a..be65ad76 100644
--- a/public/vendor/codemirror/mode/python/python.js
+++ b/public/vendor/codemirror/mode/python/python.js
@@ -233,7 +233,7 @@
function dedent(stream, state) {
var indented = stream.indentation();
- while (top(state).offset > indented) {
+ while (state.scopes.length > 1 && top(state).offset > indented) {
if (top(state).type != "py") return true;
state.scopes.pop();
}