Skip to content

Commit

Permalink
Fixed #77 (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
richrd authored Jul 31, 2016
1 parent dacb66e commit a5cc15d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions suplemon/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,12 @@ def render_line_pygments(self, line, pos, x_offset, max_len):
scope = token[0]
text = self.replace_whitespace(token[1])
if token[1].isspace() and not self.app.ui.limited_colors:
# Color visible whitespace with gray
# TODO: get whitespace color from theme
pair = 9 # Gray text on normal background
pair = 9 # Default to gray text on normal background
settings = self.app.themes.get_scope("global")
if settings and settings.get("invisibles"):
fg = int(settings.get("invisibles") or -1)
bg = int(settings.get("background") or -1)
curses.init_pair(pair, fg, bg)
curs_color = curses.color_pair(pair)
# Only add tab indicators to the inital whitespace
if first_token and self.config["show_tab_indicators"]:
Expand Down

0 comments on commit a5cc15d

Please sign in to comment.