X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/8c565d86843649dc1467b5909b446021e4417bba..82198030eef6f99ad47470d82c34d9a6e1a4e6df:/blib2to3/pgen2/driver.py?ds=inline 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