Skip to content

Commit 655afb3

Browse files
committed
Fixes double hovers on blank lines
1 parent 21e0963 commit 655afb3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
9393
- Removes the seeding of the commit search command from the clipboard
9494

9595
### Fixed
96+
- Fixes an issue where double hover annotations could be shown on blank lines
9697
- Fixes an issue where remote branches couldn't be opened properly in their remote service
9798
- Fixes [#130](https://github.com/eamodio/vscode-gitlens/issues/130) - First-run "Thank you for choosing GitLens! [...]" info message shown on every start up
9899
- Fixes [#120](https://github.com/eamodio/vscode-gitlens/issues/120) - Feature Request: "Open in Remote" support for custom repositories

src/currentLineController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export class CurrentLineController extends Disposable {
432432
decoration.range = editor.document.validateRange(new Range(line, showDetailsStartIndex, line, endOfLineIndex));
433433
decorationOptions.push(decoration);
434434

435-
if (showDetailsInStartingWhitespace && showDetailsStartIndex !== 0) {
435+
if (showDetailsInStartingWhitespace && showDetailsStartIndex !== 0 && decoration.range.end.character !== 0) {
436436
decorationOptions.push(Annotations.withRange(decoration, 0, firstNonWhitespace));
437437
}
438438
}
@@ -446,7 +446,7 @@ export class CurrentLineController extends Disposable {
446446
decoration.range = editor.document.validateRange(new Range(line, showChangesStartIndex, line, endOfLineIndex));
447447
decorationOptions.push(decoration);
448448

449-
if (showChangesInStartingWhitespace && showChangesStartIndex !== 0) {
449+
if (showChangesInStartingWhitespace && showChangesStartIndex !== 0 && decoration.range.end.character !== 0) {
450450
decorationOptions.push(Annotations.withRange(decoration, 0, firstNonWhitespace));
451451
}
452452
}

0 commit comments

Comments
 (0)