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

IndexOutOfBoundsException in console-ui when header exceeds size of the terminal, fixes #1025 #1026

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

mattirn
Copy link
Collaborator

@mattirn mattirn commented Jun 25, 2024

No description provided.

@gnodet
Copy link
Member

gnodet commented Jun 25, 2024

Can we reuse the provided example to create a unit test for that ?

@gnodet gnodet added this to the 3.26.3 milestone Jun 25, 2024
@mattirn
Copy link
Collaborator Author

mattirn commented Jun 26, 2024

Can we reuse the provided example to create a unit test for that ?

Yes, that can be done.... though I'm not able to create InputStream with enter-key chars. I have tried to create it as

        InputStream inputStream = new ByteArrayInputStream("\r\r\r\r\r".getBytes());

but it does not work correctly. Currently I'm working on Windows if that does matter.

@gnodet
Copy link
Member

gnodet commented Jul 3, 2024

Can we reuse the provided example to create a unit test for that ?

Yes, that can be done.... though I'm not able to create InputStream with enter-key chars. I have tried to create it as

        InputStream inputStream = new ByteArrayInputStream("\r\r\r\r\r".getBytes());

but it does not work correctly. Currently I'm working on Windows if that does matter.

That's because the InputFlag.ICRNL is set by default in the LineDisciplinedTerminal, which makes me think that the console ui KeyMap should support both \r and \n to validate input.

@gnodet gnodet changed the title console-ui crash when header exceeds size of the terminal, fixes #1025 IndexOutOfBoundsException in console-ui when header exceeds size of the terminal, fixes #1025 Jul 3, 2024
@gnodet gnodet merged commit 89db557 into jline:master Jul 17, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants