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

LineReader encounters exception if tabs used in dummy terminal #367

Closed
offbynull opened this issue Mar 15, 2019 · 0 comments
Closed

LineReader encounters exception if tabs used in dummy terminal #367

offbynull opened this issue Mar 15, 2019 · 0 comments

Comments

@offbynull
Copy link

If in a dummy terminal and your input line is nothing but a single tab, the following exception occurs...

Exception in thread "main" java.lang.IllegalStateException: Shell error
	at com.xxx.shell.Shell.launch(Shell.java:82)
	at com.xxx.shell.Shell.main(Shell.java:70)
Caused by: java.lang.ArithmeticException: / by zero
	at org.jline.reader.impl.LineReaderImpl.toColumns(LineReaderImpl.java:4768)
	at org.jline.reader.impl.LineReaderImpl.toColumns(LineReaderImpl.java:4743)
	at org.jline.reader.impl.LineReaderImpl.computePost(LineReaderImpl.java:4708)
	at org.jline.reader.impl.LineReaderImpl.computePost(LineReaderImpl.java:4661)
	at org.jline.reader.impl.LineReaderImpl.doList(LineReaderImpl.java:4550)
	at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:4168)
	at org.jline.reader.impl.LineReaderImpl.expandOrComplete(LineReaderImpl.java:3894)
	at org.jline.reader.impl.LineReaderImpl$1.apply(LineReaderImpl.java:3506)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:587)
	at com.xxx.shell.Shell.readAndProcessCommands(Shell.java:196)
	at com.xxx.shell.Shell.launch(Shell.java:80)
	... 1 more
@gnodet gnodet closed this as completed in 886867c Mar 15, 2019
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