Skip to content

Commit

Permalink
Remove 'highlight-line' option from "Source" and "Assembly" module
Browse files Browse the repository at this point in the history
This reverts commit 4328974.

This solution is not feasible since there are Pygments style that resets the
ANSI codes with `\x1b[0m`, so the background color is reset too.

Close #116.
  • Loading branch information
cyrus-and committed May 7, 2018
1 parent 61ba469 commit 0736cf3
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .gdbinit
Expand Up @@ -885,7 +885,7 @@ class Source(Dashboard.Module):
if int(number) == current_line:
# the current line has a different style without ANSI
if R.ansi:
if self.highlighted and not self.highlight_line:
if self.highlighted:
line_format = ansi(number_format,
R.style_selected_1) + ' {}'
else:
Expand Down Expand Up @@ -913,12 +913,6 @@ class Source(Dashboard.Module):
'name': 'tab_size',
'type': int,
'check': check_gt_zero
},
'highlight-line': {
'doc': 'Decide whether the whole current line should be highlighted.',
'default': False,
'name': 'highlight_line',
'type': bool
}
}

Expand Down Expand Up @@ -1025,7 +1019,7 @@ instructions constituting the current statement are marked, if available."""
indicator = ansi(indicator, R.style_selected_1)
opcodes = ansi(opcodes, R.style_selected_1)
func_info = ansi(func_info, R.style_selected_1)
if not highlighter.active or self.highlight_line:
if not highlighter.active:
text = ansi(text, R.style_selected_1)
elif line_info and line_info.pc <= addr < line_info.last:
if not R.ansi:
Expand All @@ -1034,7 +1028,7 @@ instructions constituting the current statement are marked, if available."""
indicator = ansi(indicator, R.style_selected_2)
opcodes = ansi(opcodes, R.style_selected_2)
func_info = ansi(func_info, R.style_selected_2)
if not highlighter.active or self.highlight_line:
if not highlighter.active:
text = ansi(text, R.style_selected_2)
else:
addr_str = ansi(addr_str, R.style_low)
Expand Down Expand Up @@ -1062,12 +1056,6 @@ instructions constituting the current statement are marked, if available."""
'default': True,
'name': 'show_function',
'type': bool
},
'highlight-line': {
'doc': 'Decide whether the whole current line should be highlighted.',
'default': False,
'name': 'highlight_line',
'type': bool
}
}

Expand Down

0 comments on commit 0736cf3

Please sign in to comment.