From 350c158bfc98b5ba360a41358228b9af302052cd Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Fri, 30 Oct 2026 11:11:35 +0800 Subject: [PATCH] feat(qt): forward parser replies through the session input queue refs #28 The Qt model drains take_replies after each feed and sends them through the same bounded input path, so cursor reports reach the child in the product entry too. --- src/qt/terminal_session.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qt/terminal_session.hpp b/src/qt/terminal_session.hpp index 610b928f..13a98f69 100644 --- a/src/qt/terminal_session.hpp +++ b/src/qt/terminal_session.hpp @@ -152,8 +152,13 @@ class SessionModel final : public QObject { if (!bytes.empty()) { changed = true; if (!parser_failed_) { - try { parser_.feed(bytes); } - catch (const std::exception& error) { + try { + parser_.feed(bytes); + // Query replies (a cursor position report today) go back to the + // child through the same bounded input path as keystrokes. + for (const auto& reply : parser_.take_replies()) + send(QByteArray(reply.data(), static_cast(reply.size()))); + } catch (const std::exception& error) { parser_failed_ = true; remember_error(QString::fromUtf8(error.what())); close();