Skip to content

Commit

Permalink
Merge from 5.x: PR #16957
Browse files Browse the repository at this point in the history
Fixes #14895
  • Loading branch information
ccordoba12 committed Feb 14, 2022
2 parents 9b80c72 + b0c3685 commit d9bf591
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spyder/plugins/ipythonconsole/widgets/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# Local imports
from spyder.config.base import (
_, is_pynsist, running_in_mac_app, running_under_pytest)
from spyder.config.gui import get_color_scheme
from spyder.py3compat import to_text_string
from spyder.utils.palette import SpyderPalette
from spyder.utils.clipboard_helper import CLIPBOARD_HELPER
Expand Down Expand Up @@ -946,6 +947,17 @@ def _syntax_style_changed(self, changed=None):
else:
self._highlighter.set_style_sheet(self.style_sheet)

def _get_color(self, color):
"""
Get a color as qtconsole.styles._get_color() would return from
a builtin Pygments style.
"""
color_scheme = get_color_scheme(self.syntax_style)
return dict(
bgcolor=color_scheme['background'],
select=color_scheme['background'],
fgcolor=color_scheme['normal'][0])[color]

def _prompt_started_hook(self):
"""Emit a signal when the prompt is ready."""
if not self._reading:
Expand Down

0 comments on commit d9bf591

Please sign in to comment.