microsoft / microsoft/edit

Strange artifact on screen when using a default editor for git

Open
#462 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
14.6k
Forks
734
Avg merge
8h 40m
Merged PRs (30d)
4

Description

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](https://github.com/user-attachments/assets/8fe4a07c-3db5-4dc3-851e-fb5bcc72fe47)

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

![Image](https://github.com/user-attachments/assets/514b3320-bfb3-42b4-8fa3-856b9eca3d9b)

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with `git config --global core.editor "edit"`, comparing direct `edit` startup with invocation through `git commit`. Investigate the terminal rendering and startup behavior described in the report; done means the right-side artifact and delayed or missing file display no longer occur when Git launches the editor.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.