Skip to content

Commit

Permalink
Print foreground for indicator & right prompt for large buffers (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysthakur authored Jan 28, 2024
1 parent 42bcd61 commit a8e494f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/painting/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,21 @@ impl Painter {
self.stdout.queue(Print(&coerce_crlf(prompt_skipped)))?;

if extra_rows == 0 {
if use_ansi_coloring {
self.stdout
.queue(SetForegroundColor(prompt.get_prompt_right_color()))?;
}

self.print_right_prompt(lines)?;
}

// Adjusting extra_rows base on the calculated prompt line size
let extra_rows = extra_rows.saturating_sub(prompt_lines);

if use_ansi_coloring {
self.stdout
.queue(SetForegroundColor(prompt.get_indicator_color()))?;
}
let indicator_skipped = skip_buffer_lines(&lines.prompt_indicator, extra_rows, None);
self.stdout.queue(Print(&coerce_crlf(indicator_skipped)))?;

Expand Down

0 comments on commit a8e494f

Please sign in to comment.