revert method rename

This commit is contained in:
Arthur Ozga 2017-09-19 16:23:45 -07:00
parent 9f815e1974
commit 262d7bd53b
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ namespace ts.formatting {
* When inserting some text after an open brace, we would like to get indentation as if a newline was already there.
* By default indentation at `position` will be 0 so 'assumeNewLineBeforeCloseBrace' overrides this behavior.
*/
export function getIndentationAtPosition(position: number, sourceFile: SourceFile, options: EditorSettings, assumeNewLineBeforeCloseBrace = false): number {
export function getIndentation(position: number, sourceFile: SourceFile, options: EditorSettings, assumeNewLineBeforeCloseBrace = false): number {
if (position > sourceFile.text.length) {
return getBaseIndentation(options); // past EOF
}

View File

@ -1772,7 +1772,7 @@ namespace ts {
start = timestamp();
const result = formatting.SmartIndenter.getIndentationAtPosition(position, sourceFile, settings);
const result = formatting.SmartIndenter.getIndentation(position, sourceFile, settings);
log("getIndentationAtPosition: computeIndentation : " + (timestamp() - start));
return result;

View File

@ -557,7 +557,7 @@ namespace ts.textChanges {
options.indentation !== undefined
? options.indentation
: (options.useIndentationFromFile !== false)
? formatting.SmartIndenter.getIndentationAtPosition(pos, sourceFile, formatOptions, posStartsLine || (options.prefix === this.newLineCharacter))
? formatting.SmartIndenter.getIndentation(pos, sourceFile, formatOptions, posStartsLine || (options.prefix === this.newLineCharacter))
: 0;
const delta =
options.delta !== undefined