edit icon indicating copy to clipboard operation
edit copied to clipboard

Strange artifact on screen when using a default editor for git

Open gep13 opened this issue 6 months ago • 4 comments

I have just tried to setup edit to be the default editor for git using the following command:

git config --global core.editor "edit"

And while this seems to be working great, there is a strange artifact on the screen that I wanted to highlight.

When I run edit normally, this is what I see:

Image

But when I run edit as part of adding a commit message, for example, this is what I am seeing:

Image

What is the red/brown colour on the right hand side?

I have also see edit fail to open correctly when it is being opened by git. It appears to hang, and the file doesn't seem to be shown until I mouse my mouse and click into the file. Is this a known issue?

gep13 avatar Jun 11 '25 06:06 gep13

What is the red/brown colour on the right hand side?

It's a 72-column ruler. When writing commit messages, you're commonly supposed to stay within that number of columns.

This is also sometimes referred to as the "50/72 rule", because the summary line is often supposed to be 50 columns or shorter. But the Linux kernel development guideline asks you to stay with 70-75 columns for both the summary and body of a patch message, which I think trumps tpope's blog post, so 72 columns it is.

In the future this will be a togglable feature, but we don't have a settings model yet.

It appears to hang, and the file doesn't seem to be shown until I mouse my mouse and click into the file. Is this a known issue?

Hanging? No, that's not a known issue.

But we do have several reports of issues on startup. These issues are not reproducible on my system, but I've added workarounds for that in #424. Make sure your Windows Terminal is up to date (currently v1.22).

lhecker avatar Jun 11 '25 12:06 lhecker

@lhecker said... It's a 72-column ruler.

Ah! That makes sense! That wasn't immediately obvious to me, but now that you say it, it makes perfect sense. In other editors, the text that overruns the size goes red, rather than having a permanent presence on the screen.

@lhecker said... In the future this will be a togglable feature, but we don't have a settings model yet.

Would this settings modal include control over the size of the column, in addition to whether it is shown or not?

@lhecker said... Make sure your Windows Terminal is up to date (currently v1.22).

Let me check on this.

Thank you!

gep13 avatar Jun 11 '25 12:06 gep13

In other editors, the text that overruns the size goes red, rather than having a permanent presence on the screen.

The current design is just a result of simplifying the code and intentional per-se.

Would this settings modal include control over the size of the column, in addition to whether it is shown or not?

That's not settled yet, but I believe so.

lhecker avatar Jun 11 '25 12:06 lhecker

@lhecker said... Make sure your Windows Terminal is up to date (currently v1.22).

So, I have made sure that I have the latest version, 1.22.11141.0, so I don't think that is the issue. If I continue to see this, I will try to get some reproducible steps, where it always happens.

gep13 avatar Jun 11 '25 12:06 gep13