sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
272 stars 14 forks source link

Selected hunk is reset after staging a line #1904

Open deathaxe opened 2 months ago

deathaxe commented 2 months ago

Version info

Description

A workspace contains multiple hunks, each of which only a part of is to be staged by only using keyboard navigation.

Steps to reproduce

  1. Open a repository with multiple changes in worktree
  2. Open SM's Commit Dialog
  3. Navigate to any but the first diff hunk hitting tab key (multiple times)
  4. use cursor to select some text
  5. hit enter to stage the selected text's line
  6. hit tab key

Expected behavior

The next diff hunk is selected,
so all desired changes can be added by repeating steps 4 to 6.

Actual behavior

SM forgets its currently focused hunk and therefore focuses first one.

So if a line from hunk 1000 was staged, I now need to hit tab 1001 times to navigate to the next hunk of interest.

That's pretty inefficient.