X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/1909d8cc6b6ef62ea285a69f6d8b25630d85f04a..9138a75b759ecb690d63924503f88bfbc82d4862:/blib2to3/pgen2/driver.py diff --git a/blib2to3/pgen2/driver.py b/blib2to3/pgen2/driver.py index cc7b415..5cdd2e5 100644 --- a/blib2to3/pgen2/driver.py +++ b/blib2to3/pgen2/driver.py @@ -77,6 +77,12 @@ class Driver(object): self.logger.debug("Stop.") break prefix = "" + if type == token.INDENT: + if _prefix.startswith(value): + # Don't double-indent. Since we're delaying the prefix that + # would normally belong to INDENT, we need to put the value + # at the end versus at the beginning. + _prefix = _prefix[len(value):] + value if type in {token.INDENT, token.DEDENT}: prefix = _prefix lineno, column = end