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

Pasting in a string that is 1043 characters during interactive text input causes repeats in prompt #560

Open
eyevanovich opened this issue Aug 21, 2023 · 8 comments
Labels
bug Something isn't working priority

Comments

@eyevanovich
Copy link

When trying to input a very long string of characters, in this case a long JWT token. I'm getting repeated command prompts that show up. The good thing is that it allows me to get over the 1024 byte buffer limitation in the terminal but it's not very appealing to look at. Is it possible to fix this?

kitty-2023-08-21 at 11 01 41

@eyevanovich eyevanovich added the bug Something isn't working label Aug 21, 2023
@MarvinJWendt
Copy link
Member

Might be the same problem as in #557.
Thanks for reporting! We'll take look.

@kpurdon
Copy link

kpurdon commented Nov 16, 2023

This one is a killer for me, any updates? Any workarounds? Any hints on source (happy to contribute).

@floaust
Copy link
Member

floaust commented Nov 16, 2023

I will take a look at it tomorrow. But it seems like our logic does not handle it well atm when the input is larger than one line. @MarvinJWendt correct me if I am wrong

@kpurdon
Copy link

kpurdon commented Nov 16, 2023

I was able to workaround this (short-term, not-ideal) by trim/padding each string going in to max terminal width - a buffer, so ya it seems like the root issue is pterm isn't handling text > terminal width.

Staying tuned, thanks for the response!

@eyevanovich
Copy link
Author

Pretty sure text larger than the terminal width is the issue because if you try to resize the terminal with the text shown in the screenshot above, it will redraw every line again and again without any additional input.

@MarvinJWendt
Copy link
Member

Yes, the issue is, that we move the cursor around the terminal on key input. This is mainly done for the TextArea (TextInput.WithMultiline()) as we need to move the cursor up, down, left and right. When the string goes over the terminals width, the cursor jumps down automatically, which introduces an offset on our calculated position, resulting in duplicate lines.

@kpurdon
Copy link

kpurdon commented Jan 11, 2024

Hello! Any progress on this issue?

@emmahsax
Copy link

I'm seeing this issue too. Like the others, it's mostly a cosmetic issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority
Projects
None yet
Development

No branches or pull requests

5 participants