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 e2d971f48..778c53869 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(); + } } } }