Преглед на файлове

Changes hover to show at the cursor

main
Eric Amodio преди 2 години
родител
ревизия
9fad4e65ab
променени са 2 файла, в които са добавени 13 реда и са изтрити 4 реда
  1. +1
    -2
      CHANGELOG.md
  2. +12
    -2
      src/hovers/lineHoverController.ts

+ 1
- 2
CHANGELOG.md Целия файл

@ -8,12 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed
- Changes the current line blame hover to show at the cursor, rather than the start of the line, when showing the hover over the whole line (e.g. line & annotation)
- Changes the default of showing PR information in the current line blame annotation to reduce overhead (e.g. GitHub queries)
### Fixed
#
- Fixes [#1829](https://github.com/gitkraken/vscode-gitlens/issues/1829) - Reduce re-rendering by disabling animation in blame info in the status bar
- Fixes [#1864](https://github.com/gitkraken/vscode-gitlens/issues/1864) - Worktrees fail to load in working path with spaces
- Fixes [#1881](https://github.com/gitkraken/vscode-gitlens/issues/1881) - Worktrees icon is very small

+ 12
- 2
src/hovers/lineHoverController.ts Целия файл

@ -114,7 +114,12 @@ export class LineHoverController implements Disposable {
if (!wholeLine && this.container.lineAnnotations.suspended) return undefined;
const range = document.validateRange(
new Range(position.line, wholeLine ? 0 : maxSmallIntegerV8, position.line, maxSmallIntegerV8),
new Range(
position.line,
wholeLine ? position.character : maxSmallIntegerV8,
position.line,
maxSmallIntegerV8,
),
);
if (!wholeLine && range.start.character !== position.character) return undefined;
@ -171,7 +176,12 @@ export class LineHoverController implements Disposable {
if (!wholeLine && this.container.lineAnnotations.suspended) return undefined;
const range = document.validateRange(
new Range(position.line, wholeLine ? 0 : maxSmallIntegerV8, position.line, maxSmallIntegerV8),
new Range(
position.line,
wholeLine ? position.character : maxSmallIntegerV8,
position.line,
maxSmallIntegerV8,
),
);
if (!wholeLine && range.start.character !== position.character) return undefined;

Зареждане…
Отказ
Запис