Skip to content

Commit

Permalink
chore: error message, typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Golovin committed Oct 25, 2023
1 parent 945d18f commit 4549672
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/createCssClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ export const registerCreateCssClass = () => {

const cssClassLocation = locations.find(location => location.range.contains(classInsertPosition))

if (!cssClassLocation) return
if (!cssClassLocation) {
vscode.window.showErrorMessage('No class references found')
return
}

await vscode.commands.executeCommand('editor.action.peekLocations', document.uri, position, [cssClassLocation], 'peek', 'No references')
// TODO: set cursor positon inside the created empty rule if possible
// TODO: set cursor position inside the created empty rule if possible
await vscode.commands.executeCommand('togglePeekWidgetFocus')
// activeEditor.selection = new vscode.Selection(cssClassLocation.range.start.translate(1), cssClassLocation.range.start.translate(1))
})
Expand Down

0 comments on commit 4549672

Please sign in to comment.