forked from qt-creator/qt-creator
Terminal: Fix handling big chunks of OSC data
ShellIntegration previously ignored the initial and final flags of onOsc. Change-Id: Ifa9594fba654cf543c117835fc182d4642dc70e4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -79,10 +79,15 @@ bool ShellIntegration::canIntegrate(const Utils::CommandLine &cmdLine)
|
|||||||
|
|
||||||
void ShellIntegration::onOsc(int cmd, std::string_view str, bool initial, bool final)
|
void ShellIntegration::onOsc(int cmd, std::string_view str, bool initial, bool final)
|
||||||
{
|
{
|
||||||
Q_UNUSED(initial);
|
if (initial)
|
||||||
Q_UNUSED(final);
|
m_oscBuffer.clear();
|
||||||
|
|
||||||
QString d = QString::fromLocal8Bit(str);
|
m_oscBuffer.append(str);
|
||||||
|
|
||||||
|
if (!final)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QString d = QString::fromLocal8Bit(m_oscBuffer);
|
||||||
const auto [command, data] = Utils::splitAtFirst(d, ';');
|
const auto [command, data] = Utils::splitAtFirst(d, ';');
|
||||||
|
|
||||||
if (cmd == 1337) {
|
if (cmd == 1337) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QTemporaryDir m_tempDir;
|
QTemporaryDir m_tempDir;
|
||||||
|
QByteArray m_oscBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Terminal
|
} // namespace Terminal
|
||||||
|
|||||||
Reference in New Issue
Block a user