mirror of
https://github.com/KDE/konsole.git
synced 2026-06-10 15:05:11 -04:00
Handle changing cursor shape property without creating a new profile
Using an escape sequence, e.g. printf '\e]50;CursorShape=1\a', to change the cursor shape property like we handle DECSCUSR, i.e. as a transient change without creating a new profile (see SessionManager::sessionProfileCommandReceived()). To test: - printf '\e]50;CursorShape=1\a' to change the cursor shape, check that the current profile hasn't been switched to a new profile (that has no name as it's a temp profile) BUG: 445590 FIXED-IN: 21.12
This commit is contained in:
committed by
Kurt Hindenburg
parent
13b2ed6697
commit
97feb54397
@@ -544,6 +544,19 @@ void Vt102Emulation::processSessionAttributeRequest(int tokenSize)
|
||||
return;
|
||||
}
|
||||
|
||||
if (attribute == Session::ProfileChange) {
|
||||
if (value.startsWith(QLatin1String("CursorShape="))) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
const auto numStr = QStringView(value).right(1);
|
||||
#else
|
||||
const auto numStr = value.rightRef(1);
|
||||
#endif
|
||||
const Enum::CursorShapeEnum shape = static_cast<Enum::CursorShapeEnum>(numStr.toInt());
|
||||
Q_EMIT setCursorStyleRequest(shape);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_pendingSessionAttributesUpdates[attribute] = value;
|
||||
_sessionAttributesUpdateTimer->start(20);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user