jiebi/CodeConvo huggingface dataset:
Code change:
FYI I commented out the test. Please fix it and enable it.
The test is failing because the DOM is no longer filled with nodes so these tests can't work the way they did previously. Is it possible with Spectron to pull a DOM node object, including any custom properties it has? If so I could attach a reference to the object to the terminal element which would allow querying the terminal for this sort of information really easily.
Yes, you can access the DOM in Spectron and we do it in multiple places. For example refer to . This will allow you to execute java script code on the renderer process that has access to DOM and let you return the model you want. But please be aware that, Since it runs in a different process than the test process, console log does not work.
PR with fix is out , will merge in after release is branched off.

Related discussion:
text: } private async getTerminalText(): Promise<string[]> { <del> const linesText: string[] = await this.spectron.webclient.selectorExecute<string[]>(Terminal.TERMINAL_ROWS_SELECTOR, div => (Array.isArray(div) ? div : [div]) .map(element => { function getTextFromAll(spanElements: NodeList): string { let text = ''; for (let i = 0; i < spanElements.length; i++) { text += getText(spanElements.item(i) as HTMLElement); } return text; } function getText(spanElement: HTMLElement): string { if (spanElement.hasChildNodes()) { return getTextFromAll(spanElement.childNodes); } return spanElement.textContent || ''; } return getTextFromAll(element.querySelectorAll('span')); })); let lastLineIndex = 0; for (let index = 0; index < linesText.length; index++) { if (linesText[index].trim()) { lastLineIndex = index; </del> <ins> return await this.spectron.webclient.selectorExecute(XTERM_SELECTOR, div => { const xterm = (<any>(Array.isArray(div) ? div[0] : div)).xterm; const buffer = xterm.buffer; const lines: string[] = []; for (let i = 0; i < buffer.lines.length; i++) { lines.push(buffer.translateBufferLineToString(i, true)); } return lines; </ins> } <del> } return linesText.slice(0, lastLineIndex + 1); </del> <ins> ); </ins> } }  No newline at end of file
Code change:
I admit that it's a niche scenario, but I think that what "Open Changes" shows for not-yet-staged changes to files that have been detected as renamed in the index is incorrect, at least inconsistent with how changes to files in the index are shown that have not been renamed. Steps to Reproduce: an empty directory and initialize a git repository in it. that directory create two files and with identical content: This exact content is somewhat important, as I've confirmed that it triggers git's "rename detection" (checked with git v2.14.1). and commit both files. the first line in both files. to . "": ! does the right thing for both files, that is, it shows the changes between HEAD and the staged version: : ! : ! the first line in both files once more, but don't stage these changes. still shows the right thing for (in this case the changes between the staged version and the file in the working tree): ! As the content of both files is identical both in the index and the working tree, I would have expected the exact same result for , but now the left side is just empty instead of showing the staged version: ! VSCode Version: Code 1.16.1 (, 2017-09-14T16:26:20.018Z) OS Version: Linux x64 4.12.13-1-ARCH
Hehe great catch! Would you like to to it?
So is this issue still open and up for grabs? If so I would like to try to help
Just look above your comment, there's a PR for it already:
Fixed by

Related discussion:
text: if (ref === '~') { const fileUri = Uri.file(path); const uriString = fileUri.toString(); <del> const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.original.toString() === uriString); </del> <ins> const [indexStatus] = repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString); </ins> ref = indexStatus ? '' : 'HEAD'; }
Code change:
a .ts file tab to activate the "import statement" snippet Expected and actual: completes to a .tsx file (TypeScript + JSX) tab to activate the "import statement" snippet Actual: completes to Expected: completes to Is there any reason why the snippet is inconsistent between .ts and .tsx files?
Yes this is unintentional. I've marked this as help wanted in case anyone want to take a look. Here are the relevant snippet files:
Thanks! See I was also thinking it would be useful to add this to .js and .jsx extensions. What do you think?
Thanks for the PR! The change should be in the next insiders build Yes I think adding the same for js/jsx also make sense. Did you want to submit another PR that copies these snippets over to js/jsx?

Related discussion:
text: "Import external module.": { "prefix": "import statement", "body": [ <del> "import ${1:name} = require('$0');" </del> <ins> "import { $0 } from "${1:module}";" </ins> ], "description": "Import external module." },
Code change:
VSCode Version: Code 1.15.1 (, 2017-08-16T18:07:25.676Z) OS Version: WindowsNT x64 10.0. Extensions: ExtensionVersion ------ overtype0.2.0 python0.7.0 theme-dark-plus-contrast0.1.101 cpptools0.13.0 monitor-file1.0.1 (4 theme extensions excluded) Steps to Reproduce: there is such line in a *.bat file rem set SERVERVERSION=5.7 cursor on it, and uncomment with "Ctrl+/" expected: set SERVERVERSION=5.7 actual result: REM rem set SERVERVERSION=5.7 Looks like uncomment is unnecessarily case-sensitive. It should uncomment despite it is 'rem' or 'REM'. I don't care whether with next "Ctrl+/" it will add Upper-Case 'REM' instead of 'rem' - it is not problem. <!-- Launch with to check. --Reproduces without extensions: Yes/No

Related discussion:
text: if (offset + needleLength > haystackLength) { return false; } <ins> const haystackUpper = haystack.toUpperCase(); const needleUpper = needle.toUpperCase(); </ins> for (let i = 0; i < needleLength; i++) { <del> if (haystack.charCodeAt(offset + i) !== needle.charCodeAt(i)) { </del> <ins> if (haystackUpper.charCodeAt(offset + i) !== needleUpper.charCodeAt(i)) { </ins> return false; } }
Code change:
VSCode Version: Code - Insiders 1.19.0-insider (, 2017-12-01T06:07:42.474Z) OS Version: Darwin x64 16.5.0 Extensions: ExtensionVersion ------ beautify1.1.1 vscode-caniuse0.5.0 jshint0.10.15 tslint1.0.24 php-debug1.12.1 php-intellisense2.0.4 php-pack1.0.1 plantuml2.3.3 vscode-duplicate1.2.0 sublime-keybindings3.0.3 debugger-for-chrome3.5.0 laravel-blade1.10.0 Steps to Reproduce: a HTML file with references to javascript files over the path of the JS file in any <scripttag 'll get the tooltip "Alt + click to follow link" Well, there isn't an Alt key in my MacOS keyboard (stock Apple keyboard). So saying "Option + click to follow link" will make more sense for Mac users. Not a big deal though. Thought I'll just point out. :) <!-- Launch with to check. --Reproduces without extensions: Yes/No

Related discussion:
text: : nls.localize('links.command', "Ctrl + click to execute command") ); <del> const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(nls.localize('links.navigate.al', "Alt + click to follow link")); const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(nls.localize('links.command.al', "Alt + click to execute command")); </del> <ins> const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText( platform.isMacintosh ? nls.localize('links.navigate.al.mac', "Option + click to follow link") : nls.localize('links.navigate.al', "Alt + click to follow link") ); const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText( platform.isMacintosh ? nls.localize('links.command.al.mac', "Option + click to execute command") : nls.localize('links.command.al', "Alt + click to execute command") ); </ins> const decoration = { meta: ModelDecorationOptions.register({
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: const position = this.validatePosition(_position); const lineContent = this.getLineContent(position.lineNumber); const lineTokens = this._getLineTokens(position.lineNumber); <del> const offset = position.column - 1; const tokenIndex = lineTokens.findTokenIndexAtOffset(offset); </del> <ins> const tokenIndex = lineTokens.findTokenIndexAtOffset(position.column - 1); // (1). First try checking right biased word const [rbStartOffset, rbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex); const rightBiasedWord = getWordAtText( position.column, LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex)), lineContent.substring(rbStartOffset, rbEndOffset), rbStartOffset ); if (rightBiasedWord) { return rightBiasedWord; } // (2). Else, if we were at a language boundary, check the left biased word if (tokenIndex > 0 && rbStartOffset === position.column - 1) { // edge case, where `position` sits between two tokens belonging to two different languages const [lbStartOffset, lbEndOffset] = TextModel._findLanguageBoundaries(lineTokens, tokenIndex - 1); const leftBiasedWord = getWordAtText( position.column, LanguageConfigurationRegistry.getWordDefinition(lineTokens.getLanguageId(tokenIndex - 1)), lineContent.substring(lbStartOffset, lbEndOffset), lbStartOffset ); if (leftBiasedWord) { return leftBiasedWord; } } return null; } private static _findLanguageBoundaries(lineTokens: LineTokens, tokenIndex: number): [number, number] { </ins> const languageId = lineTokens.getLanguageId(tokenIndex); // go left until a different language is hit
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: endOffset = lineTokens.getEndOffset(i); } <del> return getWordAtText( position.column, LanguageConfigurationRegistry.getWordDefinition(languageId), lineContent.substring(startOffset, endOffset), startOffset ); </del> <ins> return [startOffset, endOffset]; </ins> } public getWordUntilPosition(position: IPosition): model.IWordAtPosition {
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: } const pos = editor.getPosition(); model.tokenizeIfCheap(pos.lineNumber); const word = model.getWordAtPosition(pos); if (!word) { return false;
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: import * as assert from 'assert'; import { Event } from 'vs/base/common/event'; import URI from 'vs/base/common/uri'; <del> import { IDisposable, dispose } from 'vs/base/common/lifecycle'; </del> <ins> import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; </ins> import { TextModel } from 'vs/editor/common/model/textModel'; import { Handler } from 'vs/editor/common/editorCommon'; <del> import { ISuggestSupport, ISuggestResult, SuggestRegistry, SuggestTriggerKind } from 'vs/editor/common/modes'; </del> <ins> import { ISuggestSupport, ISuggestResult, SuggestRegistry, SuggestTriggerKind, LanguageIdentifier, TokenizationRegistry, IState, MetadataConsts } from 'vs/editor/common/modes'; </ins> import { SuggestModel, LineContext } from 'vs/editor/contrib/suggest/suggestModel'; import { TestCodeEditor, MockScopeLocation } from 'vs/editor/test/browser/testCodeEditor'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; import { ISelectedSuggestion } from 'vs/editor/contrib/suggest/suggestWidget'; <ins> import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; </ins> function createMockEditor(model: TextModel): TestCodeEditor { const contextKeyService = new MockContextKeyService();
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: ModelRawLinesDeleted, ModelRawLinesInserted } from 'vs/editor/common/model/textModelEvents'; import { TextModel } from 'vs/editor/common/model/textModel'; <ins> import { LanguageIdentifier, TokenizationRegistry, IState, MetadataConsts } from 'vs/editor/common/modes'; import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; import { dispose, Disposable } from 'vs/base/common/lifecycle'; </ins> // --------- utils
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: suite('Editor Model - Words', () => { <del> var thisModel: TextModel; </del> <ins> const OUTER_LANGUAGE_ID = new LanguageIdentifier('outerMode', 3); const INNER_LANGUAGE_ID = new LanguageIdentifier('innerMode', 4); class OuterMode extends MockMode { constructor() { super(OUTER_LANGUAGE_ID); this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), {})); this._register(TokenizationRegistry.register(this.getLanguageIdentifier().language, { getInitialState: (): IState => NULL_STATE, tokenize: undefined, tokenize2: (line: string, state: IState): TokenizationResult2 => { const tokensArr: number[] = []; let prevLanguageId: LanguageIdentifier = undefined; for (let i = 0; i < line.length; i++) { const languageId = (line.charAt(i) === 'x' ? INNER_LANGUAGE_ID : OUTER_LANGUAGE_ID); if (prevLanguageId !== languageId) { tokensArr.push(i); tokensArr.push((languageId.id << MetadataConsts.LANGUAGEID_OFFSET)); } prevLanguageId = languageId; } const tokens = new Uint32Array(tokensArr.length); for (let i = 0; i < tokens.length; i++) { tokens[i] = tokensArr[i]; } return new TokenizationResult2(tokens, state); } })); } } class InnerMode extends MockMode { constructor() { super(INNER_LANGUAGE_ID); this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), {})); } } let disposables: Disposable[] = []; </ins> setup(() => { <del> var text = ['This text has some  words. ']; thisModel = TextModel.createFromString(text.join('n')); </del> <ins> disposables = []; </ins> }); teardown(() => { <del> thisModel.dispose(); </del> <ins> dispose(disposables); disposables = []; </ins> }); test('Get word at position', () => { <ins> const text = ['This text has some  words. ']; const thisModel = TextModel.createFromString(text.join('n')); disposables.push(thisModel); </ins> assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 1)), { word: 'This', startColumn: 1, endColumn: 5 }); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 2)), { word: 'This', startColumn: 1, endColumn: 5 }); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 4)), { word: 'This', startColumn: 1, endColumn: 5 });
Code change:
VSCode Version: Version 1.19.1 (1.19.1) 0759f77bb8d86658bc935a10a64f6182c5a1eebaOS Version: macOS, 10.12.6 Steps to Reproduce: TypeScript React, and Reproduces without extensions: Yes.
For the case: where the user has just typed , returns false since returns . This in turn is caused by having the following language ranges for the string : where = and = . These language ranges cause to take as the current word, which does not match against the known word patterns
Any update on this? The Ctrl-Space works and provides the correct autocomplete options for props with associated type. Would be nice if I didn't have to do that each time.
Have the same problem, but wonder about: "... autocomplete options for props ...". Is VS Code capable to autocomplete my custom from an imported component?

Related discussion:
text: assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 27)), null); assert.deepEqual(thisModel.getWordAtPosition(new Position(1, 28)), null); }); <ins> test('getWordAtPosition at embedded language boundaries', () => { const outerMode = new OuterMode(); const innerMode = new InnerMode(); disposables.push(outerMode, innerMode); const model = TextModel.createFromString('ab<xx>ab<x>', undefined, outerMode.getLanguageIdentifier()); disposables.push(model); assert.deepEqual(model.getWordAtPosition(new Position(1, 1)), { word: 'ab', startColumn: 1, endColumn: 3 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 2)), { word: 'ab', startColumn: 1, endColumn: 3 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 3)), { word: 'ab', startColumn: 1, endColumn: 3 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 4)), { word: 'xx', startColumn: 4, endColumn: 6 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 5)), { word: 'xx', startColumn: 4, endColumn: 6 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 6)), { word: 'xx', startColumn: 4, endColumn: 6 }); assert.deepEqual(model.getWordAtPosition(new Position(1, 7)), { word: 'ab', startColumn: 7, endColumn: 9 }); }); </ins> });
Code change:
In , the comparison functions , , , and have misleading descriptions. For example, says "Check if is before this position." I think it would be more clear to say something like "Check if this position is before ", as that is when is returned. Likewise for the other three.

Related discussion:
text: constructor(line: number, character: number); /** <del> * Check if `other` is before this position. </del> <ins> * Check if this position is before `other`. </ins> * * @param other A position. * @return `true` if position is on a smaller line
Code change:
In , the comparison functions , , , and have misleading descriptions. For example, says "Check if is before this position." I think it would be more clear to say something like "Check if this position is before ", as that is when is returned. Likewise for the other three.

Related discussion:
text: isBefore(other: Position): boolean; /** <del> * Check if `other` is before or equal to this position. </del> <ins> * Check if this position is before or equal to `other`. </ins> * * @param other A position. * @return `true` if position is on a smaller line
Code change:
In , the comparison functions , , , and have misleading descriptions. For example, says "Check if is before this position." I think it would be more clear to say something like "Check if this position is before ", as that is when is returned. Likewise for the other three.

Related discussion:
text: isBeforeOrEqual(other: Position): boolean; /** <del> * Check if `other` is after this position. </del> <ins> * Check if this position is after `other`. </ins> * * @param other A position. * @return `true` if position is on a greater line