[terminal] IJPL-183805 Fix a bug with an incorrect length passed to TtyConnectorListener

GitOrigin-RevId: 05dc4823648d447ba7b8a3be31f25a32b59a5156
This commit is contained in:
Konstantin Hudyakov
2025-04-23 18:30:31 +00:00
committed by intellij-monorepo-bot
parent e3ecc3ce36
commit 252bfa2111
@@ -25,7 +25,7 @@ class ObservableTtyConnector(delegate: TtyConnector) : ProxyTtyConnector {
override fun read(buf: CharArray, offset: Int, length: Int): Int {
val charsReadCount = connector.read(buf, offset, length)
if (charsReadCount > 0) {
fireListeners { it.charsRead(buf, offset, length) }
fireListeners { it.charsRead(buf, offset, charsReadCount) }
}
return charsReadCount
}