mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
revert method rename
This commit is contained in:
parent
9f815e1974
commit
262d7bd53b
@ -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
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user