Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input is invisible when prompt line's length is larger then window width #247

Open
Jan0660 opened this issue Mar 4, 2023 · 0 comments
Open

Comments

@Jan0660
Copy link

Jan0660 commented Mar 4, 2023

Input is invisible when a line in the prompt is longer than the console width. The issue also occurs when the prompt is filled with ANSI sequences instead of visible text. This does not seem to be a terminal(tested VSCode's, Jetbrains' and Windows Terminal) issue.

Reproduction:

using System.Text;
using PrettyPrompt; // using 4.0.4 off of NuGet

var config = new PromptConfiguration();
var prompt = new Prompt(configuration: config);

while (true)
{
    var str = new StringBuilder("prompt: ");
    for(int i = 0; i < 100; i++)
        str.Append("hellohello");
        // str.Append("\u001b[0m");
    config.Prompt = str.ToString();
    var input = await prompt.ReadLineAsync();
    Console.WriteLine("input: " + input.Text);
}

With appending "hellohello" from the above code:
image
And with appending the ANSI reset:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant