Skip to content

Commit

Permalink
fix(Pod): console coloring bug (#876)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic authored Jan 19, 2025
1 parent dd899b3 commit 185659c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/KubeUI/ViewModels/Workloads/Pod/PodConsoleViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,17 @@ public ConsoleColorizer(Terminal terminal)
/// <inheritdoc/>
protected override void ColorizeLine(DocumentLine line)
{
var lineNumber = line.LineNumber - 1 + _terminal.Buffer.YBase;

if (line.Length > 0)
{
var colors = new HighlightingColor[line.Length];

for (var cell = 0; cell < line.Length; cell++)
{
if (_terminal.Buffer.Lines.Length > line.LineNumber - 1)
if (_terminal.Buffer.Lines.Length > lineNumber)
{
var row = _terminal.Buffer.Lines[line.LineNumber - 1];
var row = _terminal.Buffer.Lines[lineNumber];

if (row.Length > cell)
{
Expand Down

0 comments on commit 185659c

Please sign in to comment.