Compare commits

...

3 Commits

Author SHA1 Message Date
Mike Griese
070b8f68cc always forgetting these 2023-07-19 14:50:49 -05:00
Mike Griese
ad7784453a oh this is gonna bite me constantly 2023-07-19 09:55:26 -05:00
Mike Griese
9efc1c282c Add support for the VSCode mark sequences*
\*that we already support

VsCode has their own fork of the FTCS marks. Theirs uses `633` as the OSC prefix
instead of `133`. This adds support to the Terminal for that format, as an alias
for the FTCS marks we already support.

This does not add any of the other sequences we didn't already support.

see: #11000
2023-07-19 09:48:40 -05:00
6 changed files with 18 additions and 1 deletions

View File

@@ -136,6 +136,7 @@ public:
virtual bool DoITerm2Action(const std::wstring_view string) = 0;
virtual bool DoFinalTermAction(const std::wstring_view string) = 0;
virtual bool DoXtermJsAction(const std::wstring_view string) = 0;
virtual StringHandler DownloadDRCS(const VTInt fontNumber,
const VTParameter startChar,

View File

@@ -3729,6 +3729,13 @@ bool AdaptDispatch::DoFinalTermAction(const std::wstring_view string)
return false;
}
// We literally only implement the xterm.js sequences that are aliases for the
// final term ones. Just implement exactly the same.
bool AdaptDispatch::DoXtermJsAction(const std::wstring_view string)
{
return DoFinalTermAction(string);
}
// Method Description:
// - DECDLD - Downloads one or more characters of a dynamically redefinable
// character set (DRCS) with a specified pixel pattern. The pixel array is

View File

@@ -138,6 +138,7 @@ namespace Microsoft::Console::VirtualTerminal
bool DoITerm2Action(const std::wstring_view string) override;
bool DoFinalTermAction(const std::wstring_view string) override;
bool DoXtermJsAction(const std::wstring_view string) override;
StringHandler DownloadDRCS(const VTInt fontNumber,
const VTParameter startChar,

View File

@@ -129,6 +129,7 @@ public:
bool DoITerm2Action(const std::wstring_view /*string*/) override { return false; }
bool DoFinalTermAction(const std::wstring_view /*string*/) override { return false; }
bool DoXtermJsAction(const std::wstring_view /*string*/) override { return false; }
StringHandler DownloadDRCS(const VTInt /*fontNumber*/,
const VTParameter /*startChar*/,

View File

@@ -417,7 +417,8 @@ bool OutputStateMachineEngine::ActionVt52EscDispatch(const VTID id, const VTPara
bool OutputStateMachineEngine::ActionCsiDispatch(const VTID id, const VTParameters parameters)
{
// Bail out if we receive subparameters, but we don't accept them in the sequence.
if (parameters.hasSubParams() && !_CanSeqAcceptSubParam(id, parameters)) [[unlikely]]
if (parameters.hasSubParams() && !_CanSeqAcceptSubParam(id, parameters))
[[unlikely]]
{
return false;
}
@@ -868,6 +869,11 @@ bool OutputStateMachineEngine::ActionOscDispatch(const wchar_t /*wch*/,
success = _dispatch->DoFinalTermAction(string);
break;
}
case OscActionCodes::XtermJsAction:
{
success = _dispatch->DoXtermJsAction(string);
break;
}
default:
// If no functions to call, overall dispatch was a failure.
success = false;

View File

@@ -214,6 +214,7 @@ namespace Microsoft::Console::VirtualTerminal
ResetBackgroundColor = 111, // Not implemented
ResetCursorColor = 112,
FinalTermAction = 133,
XtermJsAction = 633,
ITerm2Action = 1337,
};