Skip to content

Commit 3e88f2f

Browse files
author
Kapil Borle
committed
Rename method to find formatting region
1 parent 0216091 commit 3e88f2f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,15 @@ private async Task HandleGetFormatScriptRegionRequest(
254254
var line = scriptFile.GetLine(lineNumber);
255255
if (!String.IsNullOrEmpty(line))
256256
{
257-
scriptRegion = this.editorSession.LanguageService.GetSmallestStatementAstRegion(
257+
scriptRegion = this.editorSession.LanguageService.FindSmallestStatementAstRegion(
258258
scriptFile,
259259
lineNumber,
260260
line.Length);
261261
}
262262
break;
263263

264264
case "}":
265-
scriptRegion = this.editorSession.LanguageService.GetSmallestStatementAstRegion(
265+
scriptRegion = this.editorSession.LanguageService.FindSmallestStatementAstRegion(
266266
scriptFile,
267267
lineNumber,
268268
columnNumber);

src/PowerShellEditorServices/Language/LanguageService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,12 @@ await CommandHelpers.GetCommandInfo(
458458
/// <param name="lineNumber">1-based line number of the position.</param>
459459
/// <param name="columnNumber">1-based column number of the position.</param>
460460
/// <returns></returns>
461-
public ScriptRegion GetSmallestStatementAstRegion(
461+
public ScriptRegion FindSmallestStatementAstRegion(
462462
ScriptFile scriptFile,
463463
int lineNumber,
464464
int columnNumber)
465465
{
466-
var ast = GetSmallestStatementAst(scriptFile, lineNumber, columnNumber);
466+
var ast = FindSmallestStatementAst(scriptFile, lineNumber, columnNumber);
467467
if (ast == null)
468468
{
469469
return null;
@@ -591,7 +591,7 @@ private SymbolReference FindDeclarationForBuiltinCommand(
591591
return foundDefinition;
592592
}
593593

594-
private Ast GetSmallestStatementAst(ScriptFile scriptFile, int lineNumber, int columnNumber)
594+
private Ast FindSmallestStatementAst(ScriptFile scriptFile, int lineNumber, int columnNumber)
595595
{
596596
var asts = scriptFile.ScriptAst.FindAll(ast =>
597597
{

0 commit comments

Comments
 (0)