X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8c565d86843649dc1467b5909b446021e4417bba..b5b658da0683c3e0806461946d8b492784e26d97:/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