Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'postion' typos #76187

Merged
merged 1 commit into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vs/editor/common/core/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class Position {
}

/**
* Create a new postion from this position.
* Create a new position from this position.
*
* @param newLineNumber new line number
* @param newColumn new column
Expand Down
18 changes: 9 additions & 9 deletions src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,25 +611,25 @@ export class PieceTreeBase {
let resultLen = 0;
const searcher = new Searcher(searchData.wordSeparators, searchData.regex);

let startPostion = this.nodeAt2(searchRange.startLineNumber, searchRange.startColumn);
if (startPostion === null) {
let startPosition = this.nodeAt2(searchRange.startLineNumber, searchRange.startColumn);
if (startPosition === null) {
return [];
}
let endPosition = this.nodeAt2(searchRange.endLineNumber, searchRange.endColumn);
if (endPosition === null) {
return [];
}
let start = this.positionInBuffer(startPostion.node, startPostion.remainder);
let start = this.positionInBuffer(startPosition.node, startPosition.remainder);
let end = this.positionInBuffer(endPosition.node, endPosition.remainder);

if (startPostion.node === endPosition.node) {
this.findMatchesInNode(startPostion.node, searcher, searchRange.startLineNumber, searchRange.startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result);
if (startPosition.node === endPosition.node) {
this.findMatchesInNode(startPosition.node, searcher, searchRange.startLineNumber, searchRange.startColumn, start, end, searchData, captureMatches, limitResultCount, resultLen, result);
return result;
}

let startLineNumber = searchRange.startLineNumber;

let currentNode = startPostion.node;
let currentNode = startPosition.node;
while (currentNode !== endPosition.node) {
let lineBreakCnt = this.getLineFeedCnt(currentNode.piece.bufferIndex, start, currentNode.piece.end);

Expand Down Expand Up @@ -663,9 +663,9 @@ export class PieceTreeBase {
}

startLineNumber++;
startPostion = this.nodeAt2(startLineNumber, 1);
currentNode = startPostion.node;
start = this.positionInBuffer(startPostion.node, startPostion.remainder);
startPosition = this.nodeAt2(startLineNumber, 1);
currentNode = startPosition.node;
start = this.positionInBuffer(startPosition.node, startPosition.remainder);
}

if (startLineNumber === searchRange.endLineNumber) {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/common/services/resourceConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface ITextResourceConfigurationService {
* Value can be of native type or an object keyed off the section name.
*
* @param resource - Resource for which the configuration has to be fetched.
* @param postion - Position in the resource for which configuration has to be fetched.
* @param position - Position in the resource for which configuration has to be fetched.
* @param section - Section of the configuraion.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/dnd/dragAndDropCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class DragAndDropCommand implements editorCommon.ICommand {
this.selection.endColumn
);
} else {
// The target position is before the selection's end postion. Since the selection doesn't contain the target position, the selection is one-line and target position is before this selection.
// The target position is before the selection's end position. Since the selection doesn't contain the target position, the selection is one-line and target position is before this selection.
this.targetSelection = new Selection(
this.targetPosition.lineNumber - this.selection.endLineNumber + this.selection.startLineNumber,
this.targetPosition.column,
Expand Down
2 changes: 1 addition & 1 deletion src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ declare namespace monaco {
readonly column: number;
constructor(lineNumber: number, column: number);
/**
* Create a new postion from this position.
* Create a new position from this position.
*
* @param newLineNumber new line number
* @param newColumn new column
Expand Down
2 changes: 1 addition & 1 deletion src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3826,7 +3826,7 @@ declare module 'vscode' {
/**
* Provide selection ranges for the given positions.
*
* Selection ranges should be computed individually and independend for each postion. The editor will merge
* Selection ranges should be computed individually and independend for each position. The editor will merge
* and deduplicate ranges but providers must return hierarchies of selection ranges so that a range
* is [contained](#Range.contains) by its parent.
*
Expand Down
2 changes: 1 addition & 1 deletion src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ declare module 'vscode' {
*/
provideCallHierarchyItem(
document: TextDocument,
postion: Position,
position: Position,
token: CancellationToken
): ProviderResult<CallHierarchyItem>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface CallHierarchyProvider {

provideCallHierarchyItem(
document: ITextModel,
postion: IPosition,
position: IPosition,
token: CancellationToken
): ProviderResult<CallHierarchyItem>;

Expand Down