未验证 提交 b91f516c 编写于 作者: S Sandeep Somavarapu 提交者: GitHub

Merge pull request #85652 from ryenus/master

fix typo: consecutive-word duplications
...@@ -35,7 +35,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict ...@@ -35,7 +35,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict
public applyEdit(type: interfaces.CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void; }): void { public applyEdit(type: interfaces.CommitType, document: vscode.TextDocument, edit: { replace(range: vscode.Range, newText: string): void; }): void {
// Each conflict is a set of ranges as follows, note placements or newlines // Each conflict is a set of ranges as follows, note placements or newlines
// which may not in in spans // which may not in spans
// [ Conflict Range -- (Entire content below) // [ Conflict Range -- (Entire content below)
// [ Current Header ]\n -- >>>>> Header // [ Current Header ]\n -- >>>>> Header
// [ Current Content ] -- (content) // [ Current Content ] -- (content)
...@@ -75,4 +75,4 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict ...@@ -75,4 +75,4 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict
private isNewlineOnly(text: string) { private isNewlineOnly(text: string) {
return text === '\n' || text === '\r\n'; return text === '\n' || text === '\r\n';
} }
} }
\ No newline at end of file
...@@ -64,7 +64,7 @@ export class MouseWheelClassifier { ...@@ -64,7 +64,7 @@ export class MouseWheelClassifier {
return false; return false;
} }
// 0.5 * last + 0.25 * before last + 0.125 * before before last + ... // 0.5 * last + 0.25 * 2nd last + 0.125 * 3rd last + ...
let remainingInfluence = 1; let remainingInfluence = 1;
let score = 0; let score = 0;
let iteration = 1; let iteration = 1;
......
...@@ -56,7 +56,7 @@ export class NodeSocket implements ISocket { ...@@ -56,7 +56,7 @@ export class NodeSocket implements ISocket {
// anyways and nodejs is already doing that for us: // anyways and nodejs is already doing that for us:
// > https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback // > https://nodejs.org/api/stream.html#stream_writable_write_chunk_encoding_callback
// > However, the false return value is only advisory and the writable stream will unconditionally // > However, the false return value is only advisory and the writable stream will unconditionally
// > accept and buffer chunk even if it has not not been allowed to drain. // > accept and buffer chunk even if it has not been allowed to drain.
this.socket.write(<Buffer>buffer.buffer); this.socket.write(<Buffer>buffer.buffer);
} }
......
...@@ -369,7 +369,7 @@ export class SelectionsOverlay extends DynamicViewOverlay { ...@@ -369,7 +369,7 @@ export class SelectionsOverlay extends DynamicViewOverlay {
private _previousFrameVisibleRangesWithStyle: (LineVisibleRangesWithStyle[] | null)[] = []; private _previousFrameVisibleRangesWithStyle: (LineVisibleRangesWithStyle[] | null)[] = [];
public prepareRender(ctx: RenderingContext): void { public prepareRender(ctx: RenderingContext): void {
// Build HTML for inner corners separate from HTML for the the rest of selections, // Build HTML for inner corners separate from HTML for the rest of selections,
// as the inner corner HTML can interfere with that of other selections. // as the inner corner HTML can interfere with that of other selections.
// In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777. // In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777.
const output: [string, string][] = []; const output: [string, string][] = [];
......
...@@ -75,7 +75,7 @@ suite('Find', () => { ...@@ -75,7 +75,7 @@ suite('Find', () => {
let searchStringSelectionTwoLines = getSelectionSearchString(editor); let searchStringSelectionTwoLines = getSelectionSearchString(editor);
assert.equal(searchStringSelectionTwoLines, null); assert.equal(searchStringSelectionTwoLines, null);
// Select end of first line newline and and chunk of second // Select end of first line newline and chunk of second
editor.setSelection(new Range(1, 7, 2, 4)); editor.setSelection(new Range(1, 7, 2, 4));
let searchStringSelectionSpanLines = getSelectionSearchString(editor); let searchStringSelectionSpanLines = getSelectionSearchString(editor);
assert.equal(searchStringSelectionSpanLines, null); assert.equal(searchStringSelectionSpanLines, null);
......
...@@ -152,7 +152,7 @@ abstract class SymbolNavigationAction extends EditorAction { ...@@ -152,7 +152,7 @@ abstract class SymbolNavigationAction extends EditorAction {
private async _openReference(editor: ICodeEditor, editorService: ICodeEditorService, reference: Location | LocationLink, sideBySide: boolean, highlight: boolean): Promise<ICodeEditor | undefined> { private async _openReference(editor: ICodeEditor, editorService: ICodeEditorService, reference: Location | LocationLink, sideBySide: boolean, highlight: boolean): Promise<ICodeEditor | undefined> {
// range is the target-selection-range when we have one // range is the target-selection-range when we have one
// and the the fallback is the 'full' range // and the fallback is the 'full' range
let range: IRange | undefined = undefined; let range: IRange | undefined = undefined;
if (isLocationLink(reference)) { if (isLocationLink(reference)) {
range = reference.targetSelectionRange; range = reference.targetSelectionRange;
......
...@@ -4925,7 +4925,7 @@ declare module 'vscode' { ...@@ -4925,7 +4925,7 @@ declare module 'vscode' {
* The extension kind describes if an extension runs where the UI runs * The extension kind describes if an extension runs where the UI runs
* or if an extension runs where the remote extension host runs. The extension kind * or if an extension runs where the remote extension host runs. The extension kind
* is defined in the `package.json`-file of extensions but can also be refined * is defined in the `package.json`-file of extensions but can also be refined
* via the the `remote.extensionKind`-setting. When no remote extension host exists, * via the `remote.extensionKind`-setting. When no remote extension host exists,
* the value is [`ExtensionKind.UI`](#ExtensionKind.UI). * the value is [`ExtensionKind.UI`](#ExtensionKind.UI).
*/ */
extensionKind: ExtensionKind; extensionKind: ExtensionKind;
......
...@@ -58,7 +58,7 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration) ...@@ -58,7 +58,7 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
}, },
'filenamePattern': { 'filenamePattern': {
type: 'string', type: 'string',
description: nls.localize('editor.editorAssociations.filenamePattern', "Glob pattern the the editor should be used for."), description: nls.localize('editor.editorAssociations.filenamePattern', "Glob pattern the editor should be used for."),
} }
} }
} }
......
...@@ -553,7 +553,7 @@ export class SimpleFileDialog { ...@@ -553,7 +553,7 @@ export class SimpleFileDialog {
} else if (this.endsWithSlash(value)) { } else if (this.endsWithSlash(value)) {
// The input box contains a path that doesn't exist on the system. // The input box contains a path that doesn't exist on the system.
this.filePickBox.validationMessage = nls.localize('remoteFileDialog.badPath', 'The path does not exist.'); this.filePickBox.validationMessage = nls.localize('remoteFileDialog.badPath', 'The path does not exist.');
// Save this bad path. It can take too long to to a stat on every user entered character, but once a user enters a bad path they are likely // Save this bad path. It can take too long to a stat on every user entered character, but once a user enters a bad path they are likely
// to keep typing more bad path. We can compare against this bad path and see if the user entered path starts with it. // to keep typing more bad path. We can compare against this bad path and see if the user entered path starts with it.
this.badPath = value; this.badPath = value;
return UpdateResult.InvalidPath; return UpdateResult.InvalidPath;
......
...@@ -282,15 +282,15 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE ...@@ -282,15 +282,15 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE
this.mapResourceToModel.clear(); this.mapResourceToModel.clear();
this.mapResourceToPendingModelLoaders.clear(); this.mapResourceToPendingModelLoaders.clear();
// dispose dispose listeners // dispose the dispose listeners
this.mapResourceToDisposeListener.forEach(l => l.dispose()); this.mapResourceToDisposeListener.forEach(l => l.dispose());
this.mapResourceToDisposeListener.clear(); this.mapResourceToDisposeListener.clear();
// dispose state change listeners // dispose the state change listeners
this.mapResourceToStateChangeListener.forEach(l => l.dispose()); this.mapResourceToStateChangeListener.forEach(l => l.dispose());
this.mapResourceToStateChangeListener.clear(); this.mapResourceToStateChangeListener.clear();
// dispose model content change listeners // dispose the model content change listeners
this.mapResourceToModelContentChangeListener.forEach(l => l.dispose()); this.mapResourceToModelContentChangeListener.forEach(l => l.dispose());
this.mapResourceToModelContentChangeListener.clear(); this.mapResourceToModelContentChangeListener.clear();
} }
......
...@@ -56,6 +56,6 @@ yarn watch ...@@ -56,6 +56,6 @@ yarn watch
- Beware of **focus**. **Never** depend on DOM elements having focus using `.focused` classes or `:focus` pseudo-classes, since they will lose that state as soon as another window appears on top of the running VS Code window. A safe approach which avoids this problem is to use the `waitForActiveElement` API. Many tests use this whenever they need to wait for a specific element to _have focus_. - Beware of **focus**. **Never** depend on DOM elements having focus using `.focused` classes or `:focus` pseudo-classes, since they will lose that state as soon as another window appears on top of the running VS Code window. A safe approach which avoids this problem is to use the `waitForActiveElement` API. Many tests use this whenever they need to wait for a specific element to _have focus_.
- Beware of **timing**. You need to read from or write to the DOM... but is it the right time to do that? Can you 100% guarantee that that `input` box will be visible at that point in time? Or are you just hoping that it will be so? Hope is your worst enemy in UI tests. Example: just because you triggered Quick Open with `F1`, it doesn't mean that it's open and you can just start typing; you must first wait for the input element to be in the DOM as well as be the current active element. - Beware of **timing**. You need to read from or write to the DOM... but is it the right time to do that? Can you 100% guarantee that `input` box will be visible at that point in time? Or are you just hoping that it will be so? Hope is your worst enemy in UI tests. Example: just because you triggered Quick Open with `F1`, it doesn't mean that it's open and you can just start typing; you must first wait for the input element to be in the DOM as well as be the current active element.
- Beware of **waiting**. **Never** wait longer than a couple of seconds for anything, unless it's justified. Think of it as a human using Code. Would a human take 10 minutes to run through the Search viewlet smoke test? Then, the computer should even be faster. **Don't** use `setTimeout` just because. Think about what you should wait for in the DOM to be ready and wait for that instead. - Beware of **waiting**. **Never** wait longer than a couple of seconds for anything, unless it's justified. Think of it as a human using Code. Would a human take 10 minutes to run through the Search viewlet smoke test? Then, the computer should even be faster. **Don't** use `setTimeout` just because. Think about what you should wait for in the DOM to be ready and wait for that instead.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册