Skip to content

Commit f87b7a5

Browse files
authored
Merge pull request #119 from JamiLu/improve-annotations
Improve annotations When annotations are open and if a line was deleted then the next line would have been empty which is now fixed. The line that was removed should also be empty.
2 parents bb0b658 + 26abd00 commit f87b7a5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the "simply-blame" extension will be documented in this file.
44

5+
## [1.10.3]
6+
### Update
7+
- Minor annotation improvement
8+
59
## [1.10.2]
610
### Update
711
- Fix open file and file path with spaces

src/BlameManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class BlameManager {
104104
} else if (event.contentChanges.length > 0 && changedLines < 0) {
105105
const change = event.contentChanges.find(change => change?.text === '' && change.range.start.line < change.range.end.line);
106106
for (let line = change?.range.end.line!; line > change?.range.start.line!; line--) {
107-
this.blamedDocument.splice(line + 1, 1);
107+
this.blamedDocument.splice(line, 1);
108108
}
109109
} else if (event.contentChanges.length > 0 && changedLines === 0) {
110110
event.contentChanges.forEach(change => {

0 commit comments

Comments
 (0)