mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 23:56:24 -04:00
Diving into staging from a focused main view records a snapshot so escape can return there. But it was recorded only on the half we entered (unstaged), and staging the last unstaged hunk moves the selection to the staged half (RefreshStagingPanel pushes StagingSecondary when the unstaged state goes empty). Escaping from there found no snapshot and fell back to the files panel, instead of returning to the focused main view. Record the snapshot on both staging halves at entry, and clear both on escape. Escaping from either half now returns to the focused main view, and the identity-based restore lands on the line the explorer ended up selecting — which, with the last unstaged hunk gone, is shown in the main view (the file now has only staged changes, so no split). Routing the split-and-tabbed-to-staged case to the secondary focused main view is left for follow-up; see focused-main-view-notes.md §14.3. |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||