vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

git commit hover message inconsistently dissapears

Open Inuart opened this issue 3 years ago • 8 comments

In the Source Control tab, Commits section, I am able to read a commit message by hovering the cursor over it. However, instead of the message staying there until I move the cursor somewhere else, the message disappears after what appears to be a random duration.

This makes it very annoying to read long commit messages, as I have to constantly move the cursor in and out of the commit area and I never know how many seconds do I get until the message will disappear again.

The message I'm refering to, on the bottom right: image

  • GitLens Version: v12.0.6
  • Git Version: git version 2.32.0 (Apple Git-132)
  • VSCode Version: 1.67.1
  • OS Version: macos 12.3.1

Inuart avatar May 12 '22 12:05 Inuart

@Inuart Do you still see this on VS Code 1.67.2? If so, can you record a video to show the behavior, because I can't seem to reproduce what you are seeing.

FYI, in VS Code Insiders (1.68), you can press the Alt key when the hover is shown and it will focus it and freeze it in place until you let go of the key.

eamodio avatar May 24 '22 06:05 eamodio

seems to be related to the fetch timing https://user-images.githubusercontent.com/441979/170987831-74e39467-5fe6-4492-83d9-8e7c39e78474.mov

Inuart avatar May 30 '22 11:05 Inuart

@Inuart sorry for my confusion, but in that video I don't see the hover disappearing. Is that what you were showing here? Or is there another issue?

eamodio avatar Jun 01 '22 04:06 eamodio

Sorry for not explaining it well enough. What I mean is that, on the video, when the mouse cursor hovers on top a commit made by Russ Cox, the commit message appears, allowing me to read it in full. After a few seconds though, it dissapears before I had time to read it.

It looks to me that the extension is fetching for new commit information and when it does that, it automatically closes whatever commit message it was showing.

Inuart avatar Jun 01 '22 08:06 Inuart

Oh, now I see -- sorry.

Unfortunately, I don't know of a way to prevent this. In your case, as you said, the auto-fetch is causing a refresh of the view, which hides the hover. Extensions don't have a way to know that the hover is actually visible, so I don't have the ability to decide when to pause/queue a refresh while it is still visible.

I'll leave this open to see if that changes in the future or if there is some other solution that I'm not thinking of right now.

eamodio avatar Jun 01 '22 17:06 eamodio

Talking without the required knowledge but, couldn't the view refresh only if the fetch detects that there are new commits? That would improve the experience without having to know if the hover is visible.

Inuart avatar Jun 01 '22 17:06 Inuart

In theory, yes (figuring that out wouldn't be trivial), but it still wouldn't address the case when there were new commits or other changes.

eamodio avatar Jun 01 '22 18:06 eamodio

Naively I think, given the blockchain nature of git, comparing the last commit hash from before and after the fetch is enough to know something has changed in the whole tree.

Inuart avatar Jun 01 '22 18:06 Inuart

you can press the Alt key when the hover is shown and it will focus it and freeze it in place until you let go of the key.

The Alt key seems to no longer do that. The message keeps disappearing while we are reading.

Inuart avatar Oct 07 '22 09:10 Inuart