Browse Source

Fixes double hovers on blank lines

main
Eric Amodio 7 years ago
parent
commit
655afb358e
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      src/currentLineController.ts

+ 1
- 0
CHANGELOG.md View File

@ -93,6 +93,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Removes the seeding of the commit search command from the clipboard
### Fixed
- Fixes an issue where double hover annotations could be shown on blank lines
- Fixes an issue where remote branches couldn't be opened properly in their remote service
- Fixes [#130](https://github.com/eamodio/vscode-gitlens/issues/130) - First-run "Thank you for choosing GitLens! [...]" info message shown on every start up
- Fixes [#120](https://github.com/eamodio/vscode-gitlens/issues/120) - Feature Request: "Open in Remote" support for custom repositories

+ 2
- 2
src/currentLineController.ts View File

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

Loading…
Cancel
Save