Re: [PATCH] editor: only save (and restore) the terminal if using a tty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 24, 2021 at 11:34 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Why 'vi' and 'vim' are so special?  Is this an attempt to paper over
> a bug in 'vim' on the caller side?

not sure if the bug is on vi/vim, cygwin's pty or the new conPTY that
Windows Terminal uses; but in Git for Windows, using an MSYS vim (that
uses cygwin's pty) within Windows Terminal (and other terminals that
use conPTY most likely) leads to this terminal output corruption, that
bash "fixes" when it gets the control back, but that git does not
(unless something like what I am proposing is done), and that is
specially disruptive when doing several commits in a series (ex: an
interactive rebase).

you could say it is an attempt to paper over that bug, but IMHO it is
also a way for git to protect itself from a "rogue" editor, as it is
now just trusting that the editor wouldn't mess with its terminal
settings after being invoked and it returns control to git.

Carlo



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux