mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Convert ansi-colors names back in all shells but ptk2
This commit is contained in:
parent
046bc47779
commit
2d1162ebe8
2 changed files with 16 additions and 1 deletions
15
news/fix_readline_colors.rst
Normal file
15
news/fix_readline_colors.rst
Normal file
|
@ -0,0 +1,15 @@
|
|||
**Added:** None
|
||||
|
||||
**Changed:** None
|
||||
|
||||
**Deprecated:** None
|
||||
|
||||
**Removed:** None
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Fixed a regression taat prevented the readline backend from beeing used. This
|
||||
regression was caused by the new ansi-color names, which are incompatible with
|
||||
pygments 2.2.
|
||||
|
||||
**Security:** None
|
|
@ -445,7 +445,7 @@ class XonshStyle(Style):
|
|||
self._style_name = value
|
||||
# Convert new ansicolor names to old PTK1 names
|
||||
# Can be remvoed when PTK1 support is dropped.
|
||||
if builtins.__xonsh_shell__.shell_type in ('prompt_toolkit1', 'jupyter'):
|
||||
if builtins.__xonsh_shell__.shell_type != 'prompt_toolkit2':
|
||||
for smap in [self.trap, cmap, PTK_STYLE, self._smap]:
|
||||
smap.update(ansicolors_to_ptk1_names(smap))
|
||||
if ON_WINDOWS and 'prompt_toolkit' in builtins.__xonsh_shell__.shell_type:
|
||||
|
|
Loading…
Add table
Reference in a new issue