summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index e1d9ba3..2b5c527 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1437,7 +1437,9 @@ class IndentSearcher(object):
_tokenize.tabsize = self.tabwidth
try:
try:
- _tokenize.tokenize(self.readline, self.tokeneater)
+ tokens = _tokenize.generate_tokens(self.readline)
+ for token in tokens:
+ self.tokeneater(*token)
except _tokenize.TokenError:
# since we cut off the tokenizer early, we can trigger
# spurious errors