mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
fix typo: consecutive-word duplications
This fixes unintentional duplications of words, such as `the the`, and `can can` etc. I also take the chance to make a few wording tweaks to avoid suspicious duplications.
This commit is contained in:
parent
615732feae
commit
d75f90976b
|
@ -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 {
|
||||
|
||||
// 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)
|
||||
// [ Current Header ]\n -- >>>>> Header
|
||||
// [ Current Content ] -- (content)
|
||||
|
@ -75,4 +75,4 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict
|
|||
private isNewlineOnly(text: string) {
|
||||
return text === '\n' || text === '\r\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ export class MouseWheelClassifier {
|
|||
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 score = 0;
|
||||
let iteration = 1;
|
||||
|
|
|
@ -56,7 +56,7 @@ export class NodeSocket implements ISocket {
|
|||
// anyways and nodejs is already doing that for us:
|
||||
// > 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
|
||||
// > 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ export class SelectionsOverlay extends DynamicViewOverlay {
|
|||
private _previousFrameVisibleRangesWithStyle: (LineVisibleRangesWithStyle[] | null)[] = [];
|
||||
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.
|
||||
// In final render, make sure to place the inner corner HTML before the rest of selection HTML. See issue #77777.
|
||||
const output: [string, string][] = [];
|
||||
|
|
|
@ -75,7 +75,7 @@ suite('Find', () => {
|
|||
let searchStringSelectionTwoLines = getSelectionSearchString(editor);
|
||||
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));
|
||||
let searchStringSelectionSpanLines = getSelectionSearchString(editor);
|
||||
assert.equal(searchStringSelectionSpanLines, null);
|
||||
|
|
|
@ -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> {
|
||||
// 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;
|
||||
if (isLocationLink(reference)) {
|
||||
range = reference.targetSelectionRange;
|
||||
|
|
2
src/vs/vscode.d.ts
vendored
2
src/vs/vscode.d.ts
vendored
|
@ -4925,7 +4925,7 @@ declare module 'vscode' {
|
|||
* 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
|
||||
* 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).
|
||||
*/
|
||||
extensionKind: ExtensionKind;
|
||||
|
|
|
@ -58,7 +58,7 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
|
|||
},
|
||||
'filenamePattern': {
|
||||
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 {
|
|||
} else if (this.endsWithSlash(value)) {
|
||||
// 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.');
|
||||
// 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.
|
||||
this.badPath = value;
|
||||
return UpdateResult.InvalidPath;
|
||||
|
|
|
@ -282,15 +282,15 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE
|
|||
this.mapResourceToModel.clear();
|
||||
this.mapResourceToPendingModelLoaders.clear();
|
||||
|
||||
// dispose dispose listeners
|
||||
// dispose the dispose listeners
|
||||
this.mapResourceToDisposeListener.forEach(l => l.dispose());
|
||||
this.mapResourceToDisposeListener.clear();
|
||||
|
||||
// dispose state change listeners
|
||||
// dispose the state change listeners
|
||||
this.mapResourceToStateChangeListener.forEach(l => l.dispose());
|
||||
this.mapResourceToStateChangeListener.clear();
|
||||
|
||||
// dispose model content change listeners
|
||||
// dispose the model content change listeners
|
||||
this.mapResourceToModelContentChangeListener.forEach(l => l.dispose());
|
||||
this.mapResourceToModelContentChangeListener.clear();
|
||||
}
|
||||
|
|
|
@ -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 **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.
|
||||
|
|
Loading…
Reference in a new issue