Thread (1 message) 1 message, 1 author, 2021-12-02

Re: [RFC PATCH 2/3] editor: allow for saving/restoring terminal state

From: Junio C Hamano <hidden>
Date: 2021-12-02 06:35:31

Carlo Marcelo Arenas Belón  [off-list ref] writes:
From: Junio C Hamano <redacted>

When EDITOR is invoked to modify a commit message (or do some
other editing), and it is a terminal mode editor, it will need to
change the terminal settings, and if it misbehaves could 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
the editor is known to have issues and unless the user has told
us through a boolean configuration "editor.stty" that it is safe
not to do so.

[1] https://github.com/microsoft/terminal/issues/9359
---
The commit message was contributed by me, but the rest comes from:
https://lore.kernel.org/git/xmqq7dcnyh5o.fsf@gitster.g/ (local)
Signed-of-by is missing as I didn't know what would be preferred
or if the Author will be ok with my grammar (ginger free grammar
check seems to approve, otherwise)
It was merely an illustration patch, without 3/3 it would not be
complete, and most importantly, finishing the last mile like 3/3 did
is 80% of the work.  I'd rather see you take the authorship of the
commit that results from the squashing of 2 and 3.

Any patch I send here is by default signed off by me.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help