forked from microsoft/terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ece0c04
commit 7a7fbe1
Showing
7 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
diff --git a/src/terminal/adapter/ITermDispatch.hpp b/src/terminal/adapter/ITermDispatch.hpp | ||
index e39769964..d59d7ef33 100644 | ||
--- a/src/terminal/adapter/ITermDispatch.hpp | ||
+++ b/src/terminal/adapter/ITermDispatch.hpp | ||
@@ -147,6 +147,8 @@ public: | ||
|
||
virtual bool DoVsCodeAction(const std::wstring_view string) = 0; | ||
|
||
+ virtual bool DoWarpAction(const std::wstring_view string) = 0; | ||
+ | ||
virtual StringHandler DownloadDRCS(const VTInt fontNumber, | ||
const VTParameter startChar, | ||
const DispatchTypes::DrcsEraseControl eraseControl, | ||
diff --git a/src/terminal/adapter/adaptDispatch.cpp b/src/terminal/adapter/adaptDispatch.cpp | ||
index 4135cac88..d50daef0b 100644 | ||
--- a/src/terminal/adapter/adaptDispatch.cpp | ||
+++ b/src/terminal/adapter/adaptDispatch.cpp | ||
@@ -3746,6 +3746,20 @@ bool AdaptDispatch::DoConEmuAction(const std::wstring_view string) | ||
return false; | ||
} | ||
|
||
+// Method Description: | ||
+// - Performs a Warp Action | ||
+// - | ||
+bool AdaptDispatch::DoWarpAction(const std::wstring_view) | ||
+{ | ||
+ const auto isConPty = _api.IsConsolePty(); | ||
+ if (isConPty) { | ||
+ // Flush the frame manually, to make sure marks end up on the right | ||
+ // line, like the alt buffer sequence. | ||
+ _renderer.TriggerFlush(false); | ||
+ } | ||
+ return false; | ||
+} | ||
+ | ||
// Method Description: | ||
// - Performs a iTerm2 action | ||
// - Ascribes to the ITermDispatch interface | ||
diff --git a/src/terminal/adapter/adaptDispatch.hpp b/src/terminal/adapter/adaptDispatch.hpp | ||
index dbea2fcd8..2623120cf 100644 | ||
--- a/src/terminal/adapter/adaptDispatch.hpp | ||
+++ b/src/terminal/adapter/adaptDispatch.hpp | ||
@@ -150,6 +150,8 @@ namespace Microsoft::Console::VirtualTerminal | ||
|
||
bool DoVsCodeAction(const std::wstring_view string) override; | ||
|
||
+ bool DoWarpAction(const std::wstring_view string) override; | ||
+ | ||
StringHandler DownloadDRCS(const VTInt fontNumber, | ||
const VTParameter startChar, | ||
const DispatchTypes::DrcsEraseControl eraseControl, | ||
diff --git a/src/terminal/adapter/termDispatch.hpp b/src/terminal/adapter/termDispatch.hpp | ||
index 3a1d19a09..77ef073da 100644 | ||
--- a/src/terminal/adapter/termDispatch.hpp | ||
+++ b/src/terminal/adapter/termDispatch.hpp | ||
@@ -140,6 +140,8 @@ public: | ||
|
||
bool DoVsCodeAction(const std::wstring_view /*string*/) override { return false; } | ||
|
||
+ bool DoWarpAction(const std::wstring_view /*string*/) override { return false; } | ||
+ | ||
StringHandler DownloadDRCS(const VTInt /*fontNumber*/, | ||
const VTParameter /*startChar*/, | ||
const DispatchTypes::DrcsEraseControl /*eraseControl*/, | ||
diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp | ||
index 7568f1546..5bdce5ad7 100644 | ||
--- a/src/terminal/parser/OutputStateMachineEngine.cpp | ||
+++ b/src/terminal/parser/OutputStateMachineEngine.cpp | ||
@@ -913,6 +913,11 @@ bool OutputStateMachineEngine::ActionOscDispatch(const size_t parameter, const s | ||
success = _dispatch->DoVsCodeAction(string); | ||
break; | ||
} | ||
+ case OscActionCodes::WarpAction: | ||
+ { | ||
+ success = _dispatch->DoWarpAction(string); | ||
+ break; | ||
+ } | ||
default: | ||
// If no functions to call, overall dispatch was a failure. | ||
success = false; | ||
diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp | ||
index 0970e45de..c2658e709 100644 | ||
--- a/src/terminal/parser/OutputStateMachineEngine.hpp | ||
+++ b/src/terminal/parser/OutputStateMachineEngine.hpp | ||
@@ -229,6 +229,7 @@ namespace Microsoft::Console::VirtualTerminal | ||
FinalTermAction = 133, | ||
VsCodeAction = 633, | ||
ITerm2Action = 1337, | ||
+ WarpAction = 9278, | ||
}; | ||
|
||
bool _GetOscSetColorTable(const std::wstring_view string, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters