Re: [PATCH v3 1/2] launch_editor: waiting for editor message

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

 



On 12/04/2024 18:24, rsbecker@xxxxxxxxxxxxx wrote:
On Friday, April 12, 2024 1:15 PM, Rubén Justo wrote:
Subject: [PATCH v3 1/2] launch_editor: waiting for editor message

We have a hint shown when we are waiting for user's editor since
abfb04d0c7 (launch_editor(): indicate that Git waits for user input, 2017-12-07).

After showing the hint, we call start_command() which can return with an error.
Then we'll show "unable to start editor...", after having said "Waiting for your
editor...", which may be confusing.

Move the code to show the hint below the start_command().

My thought on this move is for esoteric (but commonly used) terminal emulators. If one is on a t6530, tn3270, or w3270/9 emulator, for example, the emulator switches modes from text on the POSIX side to block/full screen mode when the editor is launched. Printing a message after the editor has launched has the potential to dump the message into the terminal emulation buffer and get caught in the commit text comment. This is not desirable. This change could have seriously undesirable side-effects.

Writing to the terminal after starting the editor is a bad idea for the reason you describe regardless of the terminal type. I don't think there is a sensible way to avoid showing the hint before we know whether the editor started successfully or not.

On the other side, if the message is not displayed in the emulation buffer, it is deferred until after the editor closes, which makes the message a bit pointless.

I think the message is there for gui editors, with a terminal editor it is obvious that git has started the editor and the user doesn't really see the message because it is cleared when the editor exits successfully.

Best Wishes

Phillip

--Randall







[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