Skip to content

ProgressBar.WriteLine does not work correctly on multiline writes or when lines are longer then ConsoleWidth #102

@EddyToo

Description

@EddyToo

The DefaultConsoleWrite method assumes that the written height will always be 1 which is obviously not the case when writing multiline strings or when the string contents does not fit on a single line.
The effect is that anything beyond the first line will be overwritten

The method also increases the _originalCursorTop with the lines written, ignoring the effect scrolling beyond the size of the buffer has. Since 5 messages can be written for each draw operation it can lead to _originalCursorTop exceeding WindowHeight.
This causes different visual issues because the code looses track of where the top of the progressbar was/should be

This issue is related to #79

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