mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
only remove attribute if it exists
Attempt to fix #2264 which only rears its head during history replay (on linux).
This commit is contained in:
parent
b5f48cdcee
commit
f71e191cd8
2 changed files with 16 additions and 1 deletions
14
news/fix_history_replay.rst
Normal file
14
news/fix_history_replay.rst
Normal file
|
@ -0,0 +1,14 @@
|
|||
**Added:** None
|
||||
|
||||
**Changed:** None
|
||||
|
||||
**Deprecated:** None
|
||||
|
||||
**Removed:** None
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* ``history replay`` no longer barfs on ``style_name`` when setting up the
|
||||
environment
|
||||
|
||||
**Security:** None
|
|
@ -1576,6 +1576,7 @@ def intensify_colors_on_win_setter(enable):
|
|||
"""
|
||||
enable = to_bool(enable)
|
||||
if hasattr(builtins, '__xonsh_shell__'):
|
||||
if hasattr(builtins.__xonsh_shell__.shell.styler, 'style_name'):
|
||||
delattr(builtins.__xonsh_shell__.shell.styler, 'style_name')
|
||||
return enable
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue