jiebi/CodeConvo huggingface dataset:
Change:
Issue Type: <bBug</bInside the shell command script python is used (using it's full path) to infer the path for the actual script file (rather than the link used to run it): function realpath() { /usr/bin/python -c "import os,sys; print(([1]))" "$0"; } This doesn't work when a non-default python exists in the path along wiht a matching PYTHONPATH variable In my case, anaconda with python3 and PYTHONPATH=/usr/local/lib:/usr/local/lib/python3.6/site-packages The script exists with an error: Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x! I edited the script file to use python instead of /usr/bin/python, but this gets overwritten with every minor update, requiring redoing the edit every couple of days. Script should either not get overwritten with every update if it has not changed or to use relative path (just python instead of /usr/bin/python) VS Code version: Code - Insiders 1.22.0-insider (, 2018-03-14T06:08:15.960Z) OS version: Darwin x64 17.5.0 <details<summarySystem Info</summary </details<details<summaryExtensions (18)</summaryExtensionVersion ------ markdown-toc1.5.6 vscode-markdownlint0.14.0 matlab0.8.0 cmake-clangd-helper0.1.0 code-gnu-global0.2.2 togglehs0.1.2 codecpp-minimum0.0.1 jupyter1.1.4 code-runner0.9.3 CppSnippets0.0.13 cmake-tools-helper0.1.1 vscode-clang0.2.2 python2018.2.1 cpptools0.15.0 markdown-preview-enhanced0.3.4 cmake0.0.17 cmake-tools0.10.4 markdown-all-in-one1.1.0 (3 theme extensions excluded) </detailsReproduces without extensions <!-- generated by issue reporter --
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the for VS Code. See also our guidelines. Happy Coding!
No, this has absolutely nothing to do with the python extension or any other extension I’m talking about the script installed into /usr/local/bin/code-insiders (which I guess is also the same one installed by the non insiders version) by running: Shell Command: Install ‘code-insider’ command in path The script contains the following, where using /usr/bin/python instead of just python is incorrect and causing the issue #!/usr/bin/env bash function realpath() { /usr/bin/python -c "import os,sys; print(([1]))" "$0"; } CONTENTS="(dirname "(dirname "0")")")")")" ELECTRON="$CONTENTS/MacOS/Electron" CLI="$" ELECTRONRUNAS_NODE=1 "CLI" "$ exit $?
caused by , I think we may be able to go back to just now after
Removed the hardcoded path for python. Please review.

Discussion:
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. <del> function realpath() { /usr/bin/python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; } </del> <ins> function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; } </ins> CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")" ELECTRON="$CONTENTS/MacOS/Electron" CLI="$CONTENTS/Resources/app/out/cli.js"
Change:
The "Open in Terminal" does nothing when the current window has no folders. Instead, if there are no folders, it should open a Terminal window in the same directory as the current file.
this works for me, how are you running "Open in Terminal" exactly?
I'm using while I have a saved file focused in VSC. !
That command opens the active workspace folder currently. Maybe we should fallback to the active file if there is no folder open? Open to PRs
I would like to work on this as my first bug. Could I get some advice on how I should go about fixing this?
Great! All the external terminal code is located in the "execution" part You change will be in here: Utilizing the (see for how to pull it into that file).

Discussion:
const root = historyService.getLastActiveWorkspaceRoot(Schemas.file); if (root) { terminalService.openTerminal(root.fsPath); <ins> } else { // Opens current file's folder, if no folder is open in editor const activeFile = historyService.getLastActiveFile(); if (activeFile) { terminalService.openTerminal(paths.dirname(activeFile.fsPath)); } </ins> } } });
Change:
<!-- Do you have a question? Please ask it on --<!-- Use Help Report Issue to prefill these. --- VSCode Version: 1.21.1 OS Version: MacOS High Sierra 10.13.3 (17D102) Steps to Reproduce: markdown preview in combination with local plantuml server code to use local server for rendering a markdown with embedded plantUML content error about unsafe content ! The current only allow to enable/disable unsafe (HTTP without the S) entirely. Would it make sense to add an option that allows unsafe content from localhost but not from remote sources?
This may be ok (at least for images): If someone wants to take a look at this, you would just need to update the content security policy to allow :
Looking into it, thanks for the pointer.

Discussion:
case MarkdownPreviewSecurityLevel.AllowInsecureContent: return `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-resource: http: https: data:; media-src vscode-resource: http: https: data:; script-src 'nonce-${nonce}'; style-src vscode-resource: 'unsafe-inline' http: https: data:; font-src vscode-resource: http: https: data:;">`; <ins> case MarkdownPreviewSecurityLevel.AllowInsecureLocalContent: return `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-resource: https: data: http://localhost:* http://127.0.0.1:*; media-src vscode-resource: https: data: http://localhost:* http://127.0.0.1:*; script-src 'nonce-${nonce}'; style-src vscode-resource: 'unsafe-inline' https: data: http://localhost:* http://127.0.0.1:*; font-src vscode-resource: https: data: http://localhost:* http://127.0.0.1:*;">`; </ins> case MarkdownPreviewSecurityLevel.AllowScriptsAndAllContent: return '';

export enum MarkdownPreviewSecurityLevel { Strict = 0, AllowInsecureContent = 1, <del> AllowScriptsAndAllContent = 2 </del> <ins> AllowScriptsAndAllContent = 2, AllowInsecureLocalContent = 3 </ins> } export interface ContentSecurityPolicyArbiter {

label: markActiveWhen(currentSecurityLevel === MarkdownPreviewSecurityLevel.Strict) + localize('strict.title', 'Strict'), description: localize('strict.description', 'Only load secure content'), }, { <ins> type: MarkdownPreviewSecurityLevel.AllowInsecureLocalContent, label: markActiveWhen(currentSecurityLevel === MarkdownPreviewSecurityLevel.AllowInsecureLocalContent) + localize('insecureLocalContent.title', 'Allow insecure local content'), description: localize('insecureLocalContent.description', 'Enable loading content over http served from localhost'), }, { </ins> type: MarkdownPreviewSecurityLevel.AllowInsecureContent, label: markActiveWhen(currentSecurityLevel === MarkdownPreviewSecurityLevel.AllowInsecureContent) + localize('insecureContent.title', 'Allow insecure content'), description: localize('insecureContent.description', 'Enable loading content over http'),

'preview.showPreviewSecuritySelector.title', 'Select security settings for Markdown previews in this workspace'), }); if (!selection) { return; }
Change:
In a scss file with more than 1000 lines, add the below Try an emmet abbreviation after the above. Observe that no completions are provided Reproducible only in Insiders and not in Stable
The same happens in this case: We need to improve how to look for the selector of a rule.

Discussion:
return new vscode.CompletionList(newItems, true); }); } }  No newline at end of file

} else { stream.next(); } <ins> } else if (ch === star) { stream.backUp(1); if (stream.peek() === slash) { return; } else { stream.next(); } </ins> } } <del> // We are at an opening brace. We need to include its selector, but with one nonspace character is enough. while (!stream.sof() && String.fromCharCode(stream.backUp(1)).match(/s/)) { } startPosition = stream.pos; </del> <ins> // We are at an opening brace. We need to include its selector. // We need one non whitespace character, that's not commented and is not a block { } currentLine = stream.pos.line; openBracesRemaining = 0; while (!stream.sof()) { // Find a nonspace character while (!stream.sof() && String.fromCharCode(stream.backUp(1)).match(/s/)) { } if (stream.sof()) { break; } let characterFound = stream.peek(); // Check if such character is end of comment. if (characterFound === slash) { let ch = stream.backUp(1); if (ch === star) { stream.pos = findOpeningCommentBeforePosition(document, stream.pos) || startPosition; } else { stream.next(); } continue; } // In not CSS stylesheets, we need to skip singleLine comments. if (!isCSS && stream.pos.line !== currentLine) { currentLine = stream.pos.line; let startLineComment = document.lineAt(currentLine).text.indexOf('//'); if (startLineComment > -1 && startLineComment < stream.pos.character) { stream.pos = new vscode.Position(currentLine, startLineComment); continue; } } // Here, we know we are not in a comment if (characterFound === closeBrace) { openBracesRemaining++; } else if (!openBracesRemaining) { if (characterFound === openBrace) { return; } else { break; } } else if (characterFound === openBrace) { openBracesRemaining--; } } if (!stream.sof()) { startPosition = stream.pos; } </ins> try { return parseStylesheet(new DocumentStreamReader(document, startPosition, new vscode.Range(startPosition, endPosition))); } catch (e) {
Change:
Issue Type: <bBug</bInstalling command line tool changes ownership of away from to . Also, symlink is created as owned by . Please don't do that: not everyone is using Homebrew. VS Code version: Code 1.21.1 (, 2018-03-14T14:39:09.335Z) OS version: Darwin x64 17.4.0 <details<summarySystem Info</summary </details<details<summaryExtensions (4)</summaryExtensionVersion ------ solargraph0.13.0 Ruby0.17.0 slim0.1.2 ayu0.14.0 </detailsReproduces without extensions <!-- generated by issue reporter --
how did you install VS Code ?
Straight from the official , on a fresh new (re)install of macOS. Since I knew about the behaviour beforehand I checked the status at each step so as to open this issue: unzip move to start at this point there are no changes: is still + then a warning dialog shows up about launching an AppleScript through which will need elevated privileges, hence ask for authentication provide authentication when asked at this point, has been installed and ownership has been altered Expected behaviour: preserve ownership install inheriting ownership of
It's a good catch, though I was expecting this issue to come up much much earlier. This has been working this way for 2 years and I believe it's the first time someone has mentioned it. I'll accept a PR to fix it.
Not surprising since I suppose most people use Homebrew on Darwin, and of those who do not, many won't go and randomly check ownership of that folder, which typically occurs only once since as soon as the symlink is there no further operation is required, and the manual fix is thus a one-shot job. I merely happen to care about such things as programs requiring me to enter admin credentials and so have noticed the behaviour some time ago but was only with it due to a reinstall, so thought I might as well bring it up. Anyway, PR opened.

Discussion:
return createSymlink().then(null, err => { if (err.code === 'EACCES' || err.code === 'ENOENT') { <del> return this.createBinFolder() .then(() => createSymlink()); </del> <ins> return this.createBinFolderAndSymlink(); </ins> } return TPromise.wrapError(err);

.then(null, ignore('ENOENT', false)); } <del> private createBinFolder(): TPromise<void> { </del> <ins> private createBinFolderAndSymlink(): TPromise<void> { </ins> return new TPromise<void>((c, e) => { const buttons = [nls.localize('ok', "OK"), nls.localize('cancel2', "Cancel")]; this.dialogService.show(Severity.Info, nls.localize('warnEscalation', "Code will now prompt with 'osascript' for Administrator privileges to install the shell command."), buttons, { cancelId: 1 }).then(choice => { switch (choice) { case 0 /* OK */: <del> const command = 'osascript -e "do shell script "mkdir -p /usr/local/bin && chown " & (do shell script ("whoami")) & " /usr/local/bin" with administrator privileges"'; </del> <ins> const command = 'osascript -e "do shell script "mkdir -p /usr/local/bin && ln -sf '' + getSource() + '' '' + this.target + ''" with administrator privileges"'; </ins> nfcall(cp.exec, command, {}) .then(null, _ => TPromise.wrapError(new Error(nls.localize('cantCreateBinFolder', "Unable to create '/usr/local/bin'."))))
Change:
Testing When selecting the link to run with disabled extension then we do everything automatically, even reloading the window (which is great). However, it is almost to transparent and suggested to show a notification inside the workbench that VS Code is now run with extensions disabled..
Actually, now that I think more about it, the notification should always appear, regardless of whether it due to the issue reporter.
Also, maybe there should be an action in that notification to revert the process.

Discussion:
this._extensionHostProcessManager = null; this.startDelayed(lifecycleService); <ins> if (this._environmentService.disableExtensions) { this._notificationService.info(nls.localize('extensionsDisabled', "All extensions are disabled.")); } </ins> } private startDelayed(lifecycleService: ILifecycleService): void {
Change:
The new notifications pop open at the lower right corner of the editor. Some command palette actions pop these up with a button that I need to click on to proceed. In these cases, I have to move my mouse from the top center of the window down to the bottom right corner of the window. One such example is the "Git: Delete branch" command. I have to click on the branch I want to delete from the drop down selector, then click the notification button far away in the corner to confirm the delete. If I am deleting multiple branches at a time (because I'm finally cleaning up my local state ) I have to move the mouse back and forth a ton of times so now I use a terminal for this task instead. It would be nice to have an option that lets me decide where I want the notifications to appear. I would choose the top right corner to reduce mouse movement.
I'll narrow this issue down to make the delete branch popup a modal one, which it should be anyways.
I'm trying to repro, but don't get any such popup after selecting a branch to delete. The branch is instantly deleted. I'm on Mac OS X 10.11.16, vscode version 1.21.1

Discussion:
const message = localize('confirm force delete branch', "The branch '{0}' is not fully merged. Delete anyway?", name); const yes = localize('delete branch', "Delete Branch"); <del> const pick = await window.showWarningMessage(message, yes); </del> <ins> const pick = await window.showWarningMessage(message, { modal: true }, yes); </ins> if (pick === yes) { await run(true);
Change:
Have file with just one change Click git decoration to bring up inline diff Revert change Editor scrolls to the very end
~Hello I am not able to repro the issue.. Let me know if I am missing something.~ Sorry my bad.. Able to repro.. Will work on it..
I looked in the code where we revert the changes But looks like the issue is with the inline diff. When I revert one it navigates to show the next diff and eventually reaches the end of file if there is only one change.. Can you guide me with the code pointer where the inline diff module is located. I am not able to find it.
According to my findings, this is reproducible in Code Insiders only. Probably due to a recent change. Can you confirm this ?
Yes its reproducible in master.
the param is always as per my investigation. Please verify.
I think my first finding was wrong. If there are multiple changes in a file, the cursor position is set to the end of the file when the revert happens for the first time..
these are my findings while running Code-OSS ( debugging the latest master ) - 2 changes ( a few lines apart ). the 1st one ( inline diff view ) -the cursor moves to the end and then jumps the Inline diff view for the 2nd change. the 2nd change -the cursor moves to the end and stays there.
yeah.. The first revert causes the cursor to go down.. The second revert is optional.. Even if you close the second inline diff, the cursor is staying down. !
I tried logging the edit object that we are applying in the The edit object contains the new contents (after revert).. So my guess is, the editor rewrites the new file contents from top to bottom which leaves the cursor at the end.
Are we going in the right direction ?
Sounds good. It will be tough to fix... maybe the fix should go in the Git extension, which is the one causing the model change. Maybe record the position before and reset it after the change?
yeah that was the idea I had in my mind.. But couldn't find the interface to set the cursor position. Can you give some pointers there ?
That would be here:
Great. thanks..

Discussion:
return; } <ins> const selectionsBeforeRevert = textEditor.selections; const visibleRangesBeforeRevert = textEditor.visibleRanges; </ins> const result = applyLineChanges(originalDocument, modifiedDocument, changes); const edit = new WorkspaceEdit(); edit.replace(modifiedUri, new Range(new Position(0, 0), modifiedDocument.lineAt(modifiedDocument.lineCount - 1).range.end), result); workspace.applyEdit(edit); <ins> textEditor.selections = selectionsBeforeRevert; textEditor.revealRange(visibleRangesBeforeRevert[0]); </ins> await modifiedDocument.save(); }
Change:
For some projects, every commit has to have the signed off by tag. It would be very helpful if there was a workspace level setting that enabled signed off by flag when committing.
Verified !

Discussion:
"scope": "resource", "default": 10, "description": "%config.detectSubmodulesLimit%" <ins> }, "git.alwaysSignOff": { "type": "boolean", "scope": "resource", "default": false, "description": "%config.alwaysSignOff%" </ins> } } },

"config.inputValidation": "Controls when to show commit message input validation.", "config.detectSubmodules": "Controls whether to automatically detect git submodules.", "config.detectSubmodulesLimit": "Controls the limit of git submodules detected.", <ins> "config.alwaysSignOff": "Controls the signoff flag for all commits", </ins> "colors.modified": "Color for modified resources.", "colors.deleted": "Color for deleted resources.", "colors.untracked": "Color for untracked resources.",

// enable signing of commits if configurated opts.signCommit = enableCommitSigning; <ins> if (config.get<boolean>('alwaysSignOff')) { opts.signoff = true; } </ins> if ( // no changes (noStagedChanges && noUnstagedChanges)
Change:
<!-- Do you have a question? Please ask it on --<!-- Use Help Report Issue to prefill these. --- VSCode Version: OS Version: Steps to Reproduce: a new file with a name starting with a space (using MacOS Finder) to rename the file by removing the space at the beginning of the file name (using the VS Code explorer). <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No
Confirmed on Windows too.. Edit: problem is . trims file names, but (in this case? in all cases?) should only remove trailing spaces.

Discussion:
return filename; } <del> // Trim whitespaces filename = strings.trim(strings.trim(filename, ' '), 't'); </del> <ins> // Trim tabs filename = strings.trim(filename, 't'); </ins> <del> // Remove trailing dots </del> <ins> // Remove trailing dots, slashes, and spaces </ins> filename = strings.rtrim(filename, '.'); <del> // Remove trailing slashes </del> <ins> filename = strings.rtrim(filename, ' '); </ins> filename = strings.rtrim(filename, '/'); filename = strings.rtrim(filename, '');
Change:
Issue Type: <bSource Defect</bis missing a 't' for . I'll send a PR; looks like this isn't a public versioned API?

Discussion:
private async doSearch(): TPromise<any> { const value = this.searchBox.value || ''; this.searchExtensionsContextKey.set(!!value); <del> this.searchInstalledExtensionsContextKey.set(InstalledExtensionsView.isInsalledExtensionsQuery(value)); </del> <ins> this.searchInstalledExtensionsContextKey.set(InstalledExtensionsView.isInstalledExtensionsQuery(value)); </ins> this.searchBuiltInExtensionsContextKey.set(ExtensionsListView.isBuiltInExtensionsQuery(value)); this.recommendedExtensionsContextKey.set(ExtensionsListView.isRecommendedExtensionsQuery(value)); this.nonEmptyWorkspaceContextKey.set(this.contextService.getWorkbenchState() !== WorkbenchState.EMPTY);

export class InstalledExtensionsView extends ExtensionsListView { <del> public static isInsalledExtensionsQuery(query: string): boolean { </del> <ins> public static isInstalledExtensionsQuery(query: string): boolean { </ins> return ExtensionsListView.isInstalledExtensionsQuery(query) || ExtensionsListView.isOutdatedExtensionsQuery(query) || ExtensionsListView.isDisabledExtensionsQuery(query)

} async show(query: string): TPromise<IPagedModel<IExtension>> { <del> if (InstalledExtensionsView.isInsalledExtensionsQuery(query)) { </del> <ins> if (InstalledExtensionsView.isInstalledExtensionsQuery(query)) { </ins> return super.show(query); } let searchInstalledQuery = '@installed';
Change:
testing : I was running "code-insiders" with the "--enable-proposed-api" option without noticing that the option requires an extension ID. This should be fixed either by reporting an error and aborting "code", or by interpreting a missing extension ID as the semantics "enable proposed API for any extension"
Please support the latter
:+1: I was in an endless loop running and then reading the error message . Please don't make me find out the extension id.
Yeah, the error message should simply print the extension id...
fixed vai

Discussion:
'--show-versions': localize('showVersions', "Show versions of installed extensions, when using --list-extension."), '--install-extension (<extension-id> | <extension-vsix-path>)': localize('installExtension', "Installs an extension."), '--uninstall-extension (<extension-id> | <extension-vsix-path>)': localize('uninstallExtension', "Uninstalls an extension."), <del> '--enable-proposed-api <extension-id>': localize('experimentalApis', "Enables proposed API features for an extension.") </del> <ins> '--enable-proposed-api (<extension-id>)': localize('experimentalApis', "Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually.") </ins> }; const troubleshootingHelp: { [name: string]: string; } = {

const extensionsToDisable: IExtensionIdentifier[] = []; const userMigratedSystemExtensions: IExtensionIdentifier[] = [{ id: BetterMergeId }]; <del> const enableProposedApiForAll = !this._environmentService.isBuilt || (!!this._environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0); </del> const enableProposedApiFor: string | string[] = this._environmentService.args['enable-proposed-api'] || []; <ins> const enableProposedApiForAll = !this._environmentService.isBuilt || (!!this._environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0) || (enableProposedApiFor.length === 0 && 'enable-proposed-api' in this._environmentService.args); </ins> for (const extension of allExtensions) { const isExtensionUnderDevelopment = this._environmentService.isExtensionDevelopment && extension.extensionLocation.scheme === Schemas.file && extension.extensionLocation.fsPath.indexOf(this._environmentService.extensionDevelopmentPath) === 0; // Do not disable extensions under development