Ver a proveniência

Fixes #1448 - decodes last #

main
Eric Amodio há 3 anos
ascendente
cometimento
9708ae1116
2 ficheiros alterados com 3 adições e 1 eliminações
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -1
      src/git/remotes/custom.ts

+ 1
- 0
CHANGELOG.md Ver ficheiro

@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed ### Fixed
- Fixes [1448](https://github.com/eamodio/vscode-gitlens/issues/1448) - Hashes (#) are percent encoded in custom remote urls
- Fixes [1447](https://github.com/eamodio/vscode-gitlens/issues/1447) - _Open File on Remote From..._ is missing remote branches - Fixes [1447](https://github.com/eamodio/vscode-gitlens/issues/1447) - _Open File on Remote From..._ is missing remote branches
- Fixes [1442](https://github.com/eamodio/vscode-gitlens/issues/1442) - Interactive Rebase Editor not opened but plain text file when called from terminal - Fixes [1442](https://github.com/eamodio/vscode-gitlens/issues/1442) - Interactive Rebase Editor not opened but plain text file when called from terminal
- Fixes [1439](https://github.com/eamodio/vscode-gitlens/issues/1439) - Copying a remote file URL for a file on Azure DevOps does not work — thanks to [PR #1440](https://github.com/eamodio/vscode-gitlens/pull/1440) by Lee C. ([MeltingMosaic](https://github.com/MeltingMosaic)) - Fixes [1439](https://github.com/eamodio/vscode-gitlens/issues/1439) - Copying a remote file URL for a file on Azure DevOps does not work — thanks to [PR #1440](https://github.com/eamodio/vscode-gitlens/pull/1440) by Lee C. ([MeltingMosaic](https://github.com/MeltingMosaic))

+ 2
- 1
src/git/remotes/custom.ts Ver ficheiro

@ -79,8 +79,9 @@ export class CustomRemote extends RemoteProvider {
url = Strings.interpolate(this.urls.file, this.getContext({ file: fileName, line: line })); url = Strings.interpolate(this.urls.file, this.getContext({ file: fileName, line: line }));
} }
const decodeHash = url.includes('#');
url = this.encodeUrl(url); url = this.encodeUrl(url);
if (line.includes('#')) {
if (decodeHash) {
const index = url.lastIndexOf('%23'); const index = url.lastIndexOf('%23');
if (index !== -1) { if (index !== -1) {
url = `${url.substring(0, index)}#${url.substring(index + 3)}`; url = `${url.substring(0, index)}#${url.substring(index + 3)}`;

Carregando…
Cancelar
Guardar