@@ -524,11 +524,11 @@ class Surface {
524
524
// This is written to match our Highlighter classes, which seem to
525
525
// generate only foreground color escape sequences. If necessary, this
526
526
// will need to be extended.
527
- // Only 8 basic foreground colors and reset, our Highlighter doesn't use
528
- // anything else.
527
+ // Only 8 basic foreground colors, underline and reset, our Highlighter
528
+ // doesn't use anything else.
529
529
int value;
530
530
if (!!string.consumeInteger (10 , value) || // Returns false on success.
531
- !(value == 0 ||
531
+ !(value == 0 || value == ANSI_CTRL_UNDERLINE ||
532
532
(value >= ANSI_FG_COLOR_BLACK && value <= ANSI_FG_COLOR_WHITE))) {
533
533
llvm::errs () << " No valid color code in color escape sequence.\n " ;
534
534
continue ;
@@ -542,6 +542,8 @@ class Surface {
542
542
wattr_set (m_window, saved_attr, saved_pair, nullptr );
543
543
if (use_blue_background)
544
544
::wattron (m_window, COLOR_PAIR(WhiteOnBlue));
545
+ } else if (value == ANSI_CTRL_UNDERLINE) {
546
+ ::wattron (m_window, A_UNDERLINE);
545
547
} else {
546
548
// Mapped directly to first 16 color pairs (black/blue background).
547
549
::wattron (m_window, COLOR_PAIR(value - ANSI_FG_COLOR_BLACK + 1 +
@@ -7013,7 +7015,12 @@ class SourceFileWindowDelegate : public WindowDelegate {
7013
7015
window.AttributeOn (highlight_attr);
7014
7016
7015
7017
StreamString lineStream;
7016
- m_file_sp->DisplaySourceLines (curr_line + 1 , {}, 0 , 0 , &lineStream);
7018
+
7019
+ llvm::Optional<size_t > column;
7020
+ if (is_pc_line && m_sc.line_entry .IsValid () && m_sc.line_entry .column )
7021
+ column = m_sc.line_entry .column - 1 ;
7022
+ m_file_sp->DisplaySourceLines (curr_line + 1 , column, 0 , 0 ,
7023
+ &lineStream);
7017
7024
StringRef line = lineStream.GetString ();
7018
7025
if (line.endswith (" \n " ))
7019
7026
line = line.drop_back ();
0 commit comments