mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-14 00:49:42 +00:00
8182854: jshell tool: rerun multiline snippet from history corrupts history (jdk part)
Jdk sub-repo part of fix for parent issue 8182489, test in parent commit (langtools) Reviewed-by: jlahoda
This commit is contained in:
parent
55ee56a972
commit
e7275ffe56
@ -380,7 +380,10 @@ public abstract class EditingHistory implements History {
|
||||
}
|
||||
|
||||
public void fullHistoryReplace(String source) {
|
||||
fullHistory.replace(source);
|
||||
fullHistory.removeLast();
|
||||
for (String line : source.split("\\R")) {
|
||||
fullHistory.add(line);
|
||||
}
|
||||
}
|
||||
|
||||
private class NarrowingHistoryLine implements CharSequence {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user