Skip to content

Commit 52abafb

Browse files
author
Andy Hanson
committed
Fix acquiring format options for getEditsForRefactor
1 parent 683d6c7 commit 52abafb

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/server/client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,15 +573,14 @@ namespace ts.server {
573573

574574
getEditsForRefactor(
575575
fileName: string,
576-
formatOptions: FormatCodeSettings,
576+
_formatOptions: FormatCodeSettings,
577577
positionOrRange: number | TextRange,
578578
refactorName: string,
579579
actionName: string): RefactorEditInfo {
580580

581581
const args = this.createFileLocationOrRangeRequestArgs(positionOrRange, fileName) as protocol.GetEditsForRefactorRequestArgs;
582582
args.refactor = refactorName;
583583
args.action = actionName;
584-
args.formatOptions = formatOptions;
585584

586585
const request = this.processRequest<protocol.GetEditsForRefactorRequest>(CommandNames.GetEditsForRefactor, args);
587586
const response = this.processResponse<protocol.GetEditsForRefactorResponse>(request);

src/server/protocol.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ namespace ts.server.protocol {
494494
refactor: string;
495495
/* The 'name' property from the refactoring action */
496496
action: string;
497-
formatOptions?: FormatCodeSettings,
498497
};
499498

500499

src/server/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ namespace ts.server {
14881488

14891489
const result = project.getLanguageService().getEditsForRefactor(
14901490
file,
1491-
args.formatOptions ? convertFormatOptions(args.formatOptions) : this.projectService.getFormatCodeOptions(),
1491+
this.projectService.getFormatCodeOptions(file),
14921492
position || textRange,
14931493
args.refactor,
14941494
args.action

0 commit comments

Comments
 (0)