Commit 97feb543 authored by Ahmad Samir's avatar Ahmad Samir Committed by Kurt Hindenburg
Browse files

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

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
parent 13b2ed66
Pipeline #99530 passed with stage
in 1 minute and 50 seconds
......@@ -544,6 +544,19 @@ void Vt102Emulation::processSessionAttributeRequest(int tokenSize)
if (attribute == Session::ProfileChange) {
if (value.startsWith(QLatin1String("CursorShape="))) {
const auto numStr = QStringView(value).right(1);
const auto numStr = value.rightRef(1);
const Enum::CursorShapeEnum shape = static_cast<Enum::CursorShapeEnum>(numStr.toInt());
Q_EMIT setCursorStyleRequest(shape);
_pendingSessionAttributesUpdates[attribute] = value;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment