FloppyDisco / git-stage-file

0 stars 0 forks source link

do NOT auto focus SCM view when opening a persistent Diff or a persistent File #10

Closed FloppyDisco closed 1 day ago

FloppyDisco commented 1 day ago

when focusScmSidebarOnExit is true. currently: the focus moves to the scm sidebar on exit. even when opening a file using cmd+o.

expected behavior: i think the expected behavior would be that it ignores focusScmSidebarOnExit when exiting QuickStage on this command because the user's intent here is to OPEN the file, for whatever reason, not to continue to writing the commit message.

I also think that if the user has opened any persistent Diff editors (which open in the background) their intent is to review the files they have selected, therefore focusScmSidebarOnExit should be ignored if any Persistent Diff editors have been opened, and the focus should move to the editor instead of the SCM view.

FloppyDisco commented 1 day ago

@dannypernik do you have any thoughts on this?

dannypernik commented 1 day ago

So in the case that a user wants to open the diff editor, they press space, correct? If so, I think it makes sense to ignore focusScmSidebarOnExit. My expectation is that focusScmSidebarOnExit would apply when Esc is pressed, correct?

FloppyDisco commented 1 day ago

yes, normally. when you press 'esc' the focus will shift to the SCM view so you can commit the changes. however, you can use the space bar to open a diff of the file. when you use space it opens the diff but does NOT close QuickStage so you can open multiple diffs for review easily. Then, when you press 'esc' now that there are diffs open. it will focus the diffs instead of SCM