Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnetCarpenter committed Nov 7, 2024
1 parent f03038f commit d459e45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function activate(context: vscode.ExtensionContext): void {
vscode.commands.registerCommand('sortLines.sortLinesUnique', sortLines.sortUnique),
vscode.commands.registerCommand('sortLines.sortLinesShuffle', sortLines.sortShuffle),
vscode.commands.registerCommand('sortLines.removeDuplicateLines', sortLines.removeDuplicateLines),
vscode.commands.registerCommand('sortLines.keepOnlyDuplicateLines', sortLines.keepOnlyDuplicateLines),
vscode.commands.registerCommand('sortLines.keepOnlyDuplicateLines', sortLines.keepOnlyDuplicateLines)
];

commands.forEach(command => context.subscriptions.push(command));
Expand Down
6 changes: 3 additions & 3 deletions src/sort-lines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ function sortActiveSelection(transformers: ArrayTransformer[]): Thenable<boolean
return undefined;
}

let endLine = selection.end.line
let endLine = selection.end.line;

// Ignore unselected last line
if (selection.end.character == 0 && vscode.workspace.getConfiguration('sortLines').get('ignoreUnselectedLastLine') === true) {
endLine -= 1
if (selection.end.character === 0 && vscode.workspace.getConfiguration('sortLines').get('ignoreUnselectedLastLine') === true) {
endLine -= 1;
}
return sortLines(textEditor, selection.start.line, endLine, transformers);
}
Expand Down

0 comments on commit d459e45

Please sign in to comment.