Skip to content

Commit

Permalink
formatting code and updating CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Apr 30, 2024
1 parent 3d6df36 commit baba2fd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.1.2] - 2024-04-30

### Changed

- fix: highlight entire line when used on empty selection. Thanks to [@rcoopr](https://github.com/rcoopr) for the contribution.

## [1.1.1] - 2024-04-30

### Changed
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ This project is licensed under the [**MIT License**](https://github.com/mguellse

I'm Marc Güell Segarra, a freelance software developer at [Ondori.dev](https://ondori.dev).

## Contributors

A big shout out to:

- David Kincaid ([@DaelonSuzuka](https://github.com/DaelonSuzuka))

##  Buy Me a Coffee ☕

If you found this extension useful, consider **[buying me a coffee](https://buymeacoffee.com/mguellsegarra)!**
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Highlight on Copy",
"publisher": "mguellsegarra",
"description": "Briefly flash and highlight selected copied text",
"version": "1.1.1",
"version": "1.1.2",
"icon": "icon.png",
"engines": {
"vscode": "^1.88.0"
Expand Down
6 changes: 4 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function activate(context: vscode.ExtensionContext) {
});

// Apply decoration
editor.setDecorations(decorationType, getSelections(editor));
editor.setDecorations(decorationType, getSelections(editor));

// Remove decoration after specified timeout
setTimeout(() => {
Expand All @@ -45,7 +45,9 @@ export function deactivate() {
vscode.commands.executeCommand("setContext", "highlightOnCopy.init", false);
}

function getSelections(editor: vscode.TextEditor): readonly vscode.Selection[] | vscode.Range[] {
function getSelections(
editor: vscode.TextEditor
): readonly vscode.Selection[] | vscode.Range[] {
const selections = editor.selections;
if (selections.length === 1 && selections[0].isEmpty) {
return [editor.document.lineAt(selections[0].anchor).range];
Expand Down

0 comments on commit baba2fd

Please sign in to comment.