Skip to content

Commit

Permalink
turn off default prompt styling (bold) to prevent leakage (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdncred authored Jul 31, 2023
1 parent 0b9cb47 commit ed5e48e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/painting/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ impl Painter {
// print our prompt with color
if use_ansi_coloring {
self.stdout
.queue(SetForegroundColor(prompt.get_prompt_color()))?
.queue(SetAttribute(Attribute::Bold))?;
.queue(SetForegroundColor(prompt.get_prompt_color()))?;
}

self.stdout
Expand All @@ -270,22 +269,22 @@ impl Painter {

if use_ansi_coloring {
self.stdout
.queue(SetForegroundColor(prompt.get_indicator_color()))?
.queue(SetAttribute(Attribute::Bold))?;
.queue(SetForegroundColor(prompt.get_indicator_color()))?;
}

self.stdout.queue(Print(&coerce_crlf(prompt_indicator)))?;

if use_ansi_coloring {
self.stdout
.queue(SetForegroundColor(prompt.get_prompt_right_color()))?
.queue(SetAttribute(Attribute::Bold))?;
.queue(SetForegroundColor(prompt.get_prompt_right_color()))?;
}

self.print_right_prompt(lines)?;

if use_ansi_coloring {
self.stdout.queue(ResetColor)?;
self.stdout
.queue(SetAttribute(Attribute::Reset))?
.queue(ResetColor)?;
}

self.stdout
Expand Down

0 comments on commit ed5e48e

Please sign in to comment.