Using the default LineReader setup, typing any character in i-search (ctrl-S) crashes:
java.lang.IndexOutOfBoundsException: Index: -1, Size: 0
at java.util.LinkedList.checkPositionIndex(LinkedList.java:560)
at java.util.LinkedList.listIterator(LinkedList.java:867)
at org.jline.reader.impl.history.DefaultHistory.iterator(DefaultHistory.java:283)
at org.jline.reader.impl.LineReaderImpl.searchForwards(LineReaderImpl.java:2415)
at org.jline.reader.impl.LineReaderImpl.doSearchHistory(LineReaderImpl.java:2255)
at org.jline.reader.impl.LineReaderImpl.historyIncrementalSearchForward(LineReaderImpl.java:2188)
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:533)
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:388)
at org.acz.jless.Main.main(Main.java:53)
Using the default
LineReader
setup, typing any character ini-search
(ctrl-S) crashes: