We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff0f2c3 commit b31498dCopy full SHA for b31498d
prompt_toolkit/terminal/win32_output.py
@@ -201,6 +201,12 @@ def set_attributes(self, attrs):
201
if reverse:
202
fgcolor, bgcolor = bgcolor, fgcolor
203
204
+ # Make sure to reverse, even when no values were specified.
205
+ if fgcolor is None:
206
+ fgcolor = '000000'
207
+ if bgcolor is None:
208
+ bgcolor = 'ffffff'
209
+
210
i = self.color_lookup_table.lookup_color(fgcolor, bgcolor)
211
self._winapi(windll.kernel32.SetConsoleTextAttribute, self.hconsole, i)
212
0 commit comments