Skip to content

Staging a hunk requires a new DiffView to be opened to refresh #280

@steliyan

Description

@steliyan

I use gitsigns to stage hunks, however the staged changes are not properly shown in DiffView.

How to reproduce:

  1. Open a file and add 2 new lines
  2. Go to the first line
  3. Press V (<S-v>) for V-LINE mode
  4. Stage the hunk (the selected line) using :Gitsigns stage_hunk

Expected: Diff in Changes shows only the second line/Diff in Staged shows only the first line
Actual: Diff in Changes shows the first and second lines/Diff in Staged does not show any diff (check the attached video)

Reopening using :DiffViewOpen fixes the issue, however, this is pretty bad from DX as this breaks my workflow when making and staging changes through DiffView.

Screen.Recording.2023-01-03.at.13.12.48.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions