Skip to content

vterm: Fixed OSC 0,2 to set widget title properly (decode bytestring)#561

Merged
penguinolog merged 1 commit intourwid:masterfrom
danschwarz:vterm_fix_set_title
Jun 3, 2023
Merged

vterm: Fixed OSC 0,2 to set widget title properly (decode bytestring)#561
penguinolog merged 1 commit intourwid:masterfrom
danschwarz:vterm_fix_set_title

Conversation

@danschwarz
Copy link
Copy Markdown
Contributor

@danschwarz danschwarz commented Jun 2, 2023

Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment
  • I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)
Description:

These are xterm proprietary OSC sequences.
per https://www.xfree86.org/current/ctlseqs.html:
0, 2 set window title (and 2 sets icon title, but that's irrelevant)
1 sets icon title, which we don't support
3 sets arbitrary window properties, which we don't support. It shouldn't be setting the title.

The old code was sending the raw bytestring to widget.set_title which was bad. Now it decodes the bytestring before sending.

@danschwarz danschwarz changed the title Fixed OSC 0,1,2,3 to set widget title properly (decode bytestring) vterm: Fixed OSC 0,1,2,3 to set widget title properly (decode bytestring) Jun 2, 2023
These are xterm proprietary OSC sequences.
per https://www.xfree86.org/current/ctlseqs.html:
0,2 set window title (and 2 sets icon title, but that's irrelevant)
1 sets icon title, which we don't support
3 sets arbitrary window properties, which we don't support

The previous code set the widget title using a bytestring
this led to visual artifacts.  Now we send a proper string.
@danschwarz danschwarz changed the title vterm: Fixed OSC 0,1,2,3 to set widget title properly (decode bytestring) vterm: Fixed OSC 0,2 to set widget title properly (decode bytestring) Jun 2, 2023
@penguinolog penguinolog merged commit 0d0b92e into urwid:master Jun 3, 2023
@danschwarz danschwarz deleted the vterm_fix_set_title branch June 3, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants