Skip to content

Please support the latest (new) Windows Terminal (overlapping progress bars) #97

Description

@fiso64

Konsole version: 7.0.0.7-alpha

This is the same as goblinfactory/progress-bar#3, as I can still reproduce the bug in version 7.0.0.7-alpha.

Running the following code:

using Konsole;

class Program
{
    static async Task Main(string[] args)
    {
        var rnd = new Random();

        for (int i = 1; i <= 100; i += 2)
        {
            await Task.WhenAll(
                Task.Run(() => DownloadFiles(rnd, i, $"FILE {i}")),
                Task.Run(() => DownloadFiles(rnd, i + 1, $"FILE {i + 1}"))
            );
        }
    }

    static void DownloadFiles(Random rnd, int cnt, string title)
    {
        var fileCount = rnd.Next(1, 50);
        var bar = new ProgressBar(fileCount);
        bar.Refresh(0, $"New Task {cnt}");

        for (int j = 1; j <= fileCount; j++)
        {
            bar.Next($"Progressbar {cnt}, {j + 1} files.");
            Task.Delay(rnd.Next(10, 100));
        }
    }
}

In the new windows terminal results in overlapping progress bars that sometimes do not complete. Example output:

Progressbar 88, 5 files.       (13 %) ###########
Progressbar 88, 30 files.      (100%) ##################################################################################
Progressbar 90, 10 files.      (27 %) ######################
Progressbar 89, 50 files.      (100%) ##################################################################################
Progressbar 92, 13 files.      (100%) ##################################################################################
Progressbar 91, 13 files.      (100%) ##################################################################################
Progressbar 94, 19 files.      (45 %) ####################################
Progressbar 94, 41 files.      (100%) ##################################################################################
Progressbar 96, 39 files.      (100%) ##################################################################################
Progressbar 95, 46 files.      (100%) ##################################################################################
Progressbar 98, 8 files.       (100%) ##################################################################################
Progressbar 97, 25 files.      (100%) ##################################################################################
Progressbar 100, 9 files.      (33 %) ###########################
Progressbar 100, 25 files.     (100%) ##################################################################################

The same code works as expected in the old Command Prompt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions