-
Notifications
You must be signed in to change notification settings - Fork 220
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
Jline completion has logic issues with terminal and prompt widths (StringIndexOutOfBoundsException) #604
Comments
@gnodet Let me know if there's anything I can do to help get the fix out for this. I'd love to be able to squash this regression in my next release. |
@mattirn Thank you for the update. Any idea when the fix will be available in a stable release? |
@bdw429s When you were planning to do your next release? Maybe we can synchronize our releases... I have not any plan for new features. |
@mattirn Depending on how many users this is affecting, I may put out a patch release as soon as this fix is available. |
@mattirn Hi, is there an ETA on the 3.17.2 milestone so I can plan my release? Or perhaps a snapshot build I can use in the meantime? |
@bdw429s I'm on 'maintenance mode' for me 3.17.2 can be released also next week. I still would like to look if I can found a better solution for #609. |
Thanks @mattirn I've pointed my build at the sonatype repo to grab 3.17.2-SNAPSHOT and I'll give it a test. |
@mattirn After a quick test on I also activated the |
After updating CommandBox CLI to JLine 3.17.1, some users receive this error when hitting tab:
After a lot of debugging, I have determined that the error happens when the prompt is wider than the terminal width.
There are two incorrect assumptions Jline is making. The first is that the prompt will never be wider than the terminal width. There is a popular module for CommandBox called Bullet Train that gives nice, pretty prompt like this, which can also be long depending on how much information is displayed:
The second incorrect assumption JLine is making is that there will not be any line breaks in the prompt itself. you can see in the above image that the ACTUAL prompt is just the
>
character on the second line. In fact, depending on your terminal size, there can be more than one line break in the prompt string.Jline needs to calculate the prompt length after the last line break and put in a check to ensure it is never a negative number.
The text was updated successfully, but these errors were encountered: