gh-133490: Fix syntax highlighting for remote PDB (#133494)

This commit is contained in:
Matt Wozniski 2025-05-06 05:44:49 -04:00 committed by GitHub
parent 120c9d42f2
commit fd37f1a8ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 158 additions and 7 deletions

View file

@ -1069,7 +1069,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def _colorize_code(self, code):
if self.colorize:
colors = list(_pyrepl.utils.gen_colors(code))
chars, _ = _pyrepl.utils.disp_str(code, colors=colors)
chars, _ = _pyrepl.utils.disp_str(code, colors=colors, force_color=True)
code = "".join(chars)
return code