Closed kafumanto closed 4 years ago
Confirmed. @kafumanto Thanks for reporting! I'll take a look at this.
Unfortunately, this is an issue in vscode itself, and has been reported by other maintainers of SCM extensions. We will have to wait for a fix from them.
Unfortunately, this is an issue in vscode itself, and has been reported by other maintainers of SCM extensions. We will have to wait for a fix from them.
Ok, thanks for looking at this! And thanks a lot for taking care of this extension :)
Has this been fixed? Gutter indicators still don't work for me.
VS Code: 1.52.1 Hg plugin: 1.7.1 Mac OS: 10.14.6
@architchandra This was fixed in 1.7.1 in August, and still works for me on 1.52.1. Do you have any other SCM extensions installed?
So, the gutter decorations don't work for me unless I either 1) disable GitLens, 2) don't have any git repositories in the current workspace, or 3) if I need to have a git repo open in the workspace, then make sure the first editor to open is an hg repo, not a git repo. For option 3 if I mess this up I can just open one of the hg repo's files so it's the active tab, then hit Ctrl+R to reload. It also works fine if all the git stuff is in a side-by-side editor. So it's possible to work around this issue, but I wouldn't say it's been fixed.
Maybe this is unavoidable, a consequence of GitLens' behavior. Hopefully it can be fixed on either end so that I can open a git repo and then open an hg repo and have the gutter decorations still work. The way I tend to work is with the extension Always Open Workspace (no idea why it has such bad ratings, it works perfectly for me). So I just double click a file in my file explorer and vs code scans the file's path and instantiates the containing repo in a temporary workspace. And when I open a file from the file explorer, it opens it in an editor in the current window. So I might have 3 or even 4 repos in a single workspace. And if I have more than 1 repo open, closing the last file in a repo removes that repo from the workspace.
This system makes things so much easier for me but it does mean that I tend to start VS Code in a git repo. Since I rarely just run VS Code without passing it a file to open, and this extension generates a workspace, VS Code almost always has a repo open when I run it. And since I do most of my personal stuff in git repos but still contribute to hg repos, the initial repo opened in VS Code is likeliest to be a git repo, so I'm especially prone to running into this error. Fortunately it can be resolved by using the reload command, but it does mean I lose editor history (undo/redo history), so it's not ideal.
By the way, it's not actually just the gutter decorations, but the scrollbar decorations too.
After installing the "July 2020 (version 1.48)" of Visual Studio Code, the "gutter indicators" stopped working with files in a Mercurial repo.