Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Fixup libtmt to ensure that unrecognised terminal commands are ignored, #320

Merged
merged 5 commits into from
May 17, 2022

Conversation

cdmatters
Copy link
Contributor

to stop random letters writing to the screen.

Libtmt is a VT100 terminal emulator. We have adjusted it to let it
accept DEC and IBM graphical sets, however we don't intend to support
every terminal. If a control sequence is not recognised (eg ESC [ 1 ; 2; 1 z -- a command encountered alot in various ttyrecs) we should
abort the processing of the sequence rather than returning allowing the
z to be printed to the screen.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 16, 2022
Copy link
Contributor

@samvelyan samvelyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

to stop random letters writing to the screen.

Libtmt is a VT100 terminal emulator. We have adjusted it to let it
accept DEC and IBM graphical sets, however we don't intend to support
every terminal.  If a control sequence is not recognised (eg `ESC [ 1 ;
2; 1 z`  -- a command encountered alot in various ttyrecs) we should
abort the processing of the sequence rather than returning allowing the
`z` to be printed to the screen.
@cdmatters cdmatters force-pushed the eric/vt420 branch 2 times, most recently from 6223afd to f7eb93e Compare May 16, 2022 21:21
Various commands in libtmt reset the attributes of the charact
(`attrs`). This is desirable for color (etc), but not for whether we
have DEC graphics or not. This meant if we have coloured DEC rendering,
rendering would fail.

This change ensures the permanance of the DEC flag in attrs, and updates
the test file to include this example.
Test now checks the time between last modification and creation of db.
This effectively sets a timer on how long it takes to do `mockdata`
pytest fixture.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants