Skip to content

Fix wrong inactive highlight when switching between repos #4621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

stefanhaller
Copy link
Collaborator

  • PR Description

When switching between repos, each repo might have a different focused panel; in this case, the previously focused panel would show the "inactive" highlight. By default this is only bold text, so it's barely noticeable, but it becomes more pronounced when setting e.g.

gui:
  theme:
    inactiveViewSelectedLineBgColor:
      - "#666666"

I noticed this especially when entering or leaving submodules; for example, enter a submodule by pressing enter in the Files panel, then switch to the Commits panel in the submodule, then press Esc to go back to the parent repo. This would put the focus back into the Files panel, but keep the inactive highlight in the Commits panel.

@stefanhaller stefanhaller added the bug Something isn't working label Jun 2, 2025
Copy link

codacy-production bot commented Jun 2, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for ac7de7e1 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ac7de7e) Report Missing Report Missing Report Missing
Head commit (f185e1a) 56633 49211 86.89%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4621) 6 6 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

When switching between repos, each repo might have a different focused panel; in
this case, the previously focused panel would show the "inactive" highlight. By
default this is only bold text, so it's barely noticeable, but it becomes more
pronounced when setting e.g.

gui:
  theme:
    inactiveViewSelectedLineBgColor:
      - "#666666"

I noticed this especially when entering or leaving submodules; for example,
enter a submodule by pressing enter in the Files panel, then switch to the
Commits panel in the submodule, then press Esc to go back to the parent repo.
This would put the focus back into the Files panel, but keep the inactive
highlight in the Commits panel.
@stefanhaller stefanhaller force-pushed the fix-panel-highlight-when-switching-repos branch from d84a95d to f185e1a Compare June 5, 2025 10:58
@stefanhaller stefanhaller enabled auto-merge June 5, 2025 10:59
@stefanhaller stefanhaller merged commit ac0c3db into master Jun 5, 2025
14 checks passed
@stefanhaller stefanhaller deleted the fix-panel-highlight-when-switching-repos branch June 5, 2025 11:00
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 12, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) | minor | `v0.51.1` -> `v0.52.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary>

### [`v0.52.0`](https://github.com/jesseduffield/lazygit/releases/tag/v0.52.0)

[Compare Source](jesseduffield/lazygit@v0.51.1...v0.52.0)

<!-- Release notes generated using configuration in .github/release.yml at v0.52.0 -->

#### What's Changed

##### Enhancements 🔥

-   Add user config for hiding the root item in the file tree by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4593
-   Use branchPrefix when moving commits to new branch by [@&#8203;EliasA5](https://github.com/EliasA5) in jesseduffield/lazygit#4604
-   Show default option when prompting to create a new git repo by [@&#8203;Joshuahuahua](https://github.com/Joshuahuahua) in jesseduffield/lazygit#4596

##### Fixes 🔧

-   Fix selecting large hunks, and fix problems editing very long commit descriptions by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4589
-   Kill background fetch when it requests a passphrase by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4588
-   Fix branch selection jumping back on background fetch by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4597
-   Fix resetting to a branch when a tag shares the same name, or vice versa by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4571
-   Fix wrong inactive highlight when switching between repos by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4621
-   Fix assigning custom key to pullFiles command in the Commits panel by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4617

##### Maintenance ⚙️

-   Replace literal with ConfigFilename constant by [@&#8203;mloskot](https://github.com/mloskot) in jesseduffield/lazygit#4613
-   Improve MR template wrt release notes by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4607

#### New Contributors

-   [@&#8203;mloskot](https://github.com/mloskot) made their first contribution in jesseduffield/lazygit#4613
-   [@&#8203;Joshuahuahua](https://github.com/Joshuahuahua) made their first contribution in jesseduffield/lazygit#4596

**Full Changelog**: jesseduffield/lazygit@v0.51.1...v0.52.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41MC4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants