mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
commit
1af379c856
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -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,
|
||||
|
|
2
src/vs/monaco.d.ts
vendored
2
src/vs/monaco.d.ts
vendored
|
@ -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
|
||||
|
|
2
src/vs/vscode.d.ts
vendored
2
src/vs/vscode.d.ts
vendored
|
@ -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.
|
||||
*
|
||||
|
|
2
src/vs/vscode.proposed.d.ts
vendored
2
src/vs/vscode.proposed.d.ts
vendored
|
@ -53,7 +53,7 @@ declare module 'vscode' {
|
|||
*/
|
||||
provideCallHierarchyItem(
|
||||
document: TextDocument,
|
||||
postion: Position,
|
||||
position: Position,
|
||||
token: CancellationToken
|
||||
): ProviderResult<CallHierarchyItem>;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ export interface CallHierarchyProvider {
|
|||
|
||||
provideCallHierarchyItem(
|
||||
document: ITextModel,
|
||||
postion: IPosition,
|
||||
position: IPosition,
|
||||
token: CancellationToken
|
||||
): ProviderResult<CallHierarchyItem>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue