diff --git a/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java b/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java index e2d971f4..778c5386 100644 --- a/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java +++ b/reader/src/main/java/org/jline/reader/impl/LineReaderImpl.java @@ -763,6 +763,7 @@ && getLastBinding().charAt(0) == originalAttributes.getControlChar(ControlChar.V throw e; } } finally { + boolean interrupted = Thread.interrupted(); try { lock.lock(); @@ -784,6 +785,9 @@ && getLastBinding().charAt(0) == originalAttributes.getControlChar(ControlChar.V } finally { lock.unlock(); startedReading.set(false); + if (interrupted) { + Thread.currentThread().interrupt(); + } } } }