-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editor: allow for saving/restoring terminal state
When EDITOR is invoked to modify a commit message, it will likely change the terminal settings, and if it misbehaves will leave the terminal output damaged as shown in recent reports from Windows Terminal[1] Instead use the functions provided by compat/terminal to save the settings of the terminal and recover safely, but only do so if instructed by the user through a new configuration "editor.rogue" and the terminal is fully interactive. [1] microsoft/terminal#9359 Helped-by: Johannes Schindelin <[email protected]> Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]>
- Loading branch information
Showing
3 changed files
with
22 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
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,4 @@ | ||
editor.rogue:: | ||
A boolean to indicate you might be using an editor | ||
that can't be trusted to clean its terminal state | ||
reliably. Defaults to false. |
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