rebel-readline
rebel-readline copied to clipboard
0x0D (newline) literals in .rebel_readline_history breaks repl
If I accidentally enter 0x0D
newline characters into my session and they are saved into the repl history, on subsequent startup an exception is thrown:
[Rebel readline] Type :repl/help for online help info
Execution error (StringIndexOutOfBoundsException) at java.lang.String/substring (String.java:1967).
String index out of range: -1
Additional evaluation of forms also throws an exception:
user=> (println "foo")
Execution error (IndexOutOfBoundsException) at java.util.SubList/<init> (AbstractList.java:620).
fromIndex = -11
Steps to replicate:
-
Insert
0x0D
literal into repl history: -
Start repl