Skip to content
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

fix(hint.statusline): Restore correct window if it changed #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Frederick888
Copy link
Contributor

When the Hydra takes the user to a different window, we need to restore
the status line of the old window where the hint is shown.


Thanks for the fork! I'm copying my PRs over.

This was anuvyklack/hydra.nvim#74

When the Hydra takes the user to a different window, we need to restore
the status line of the old window where the hint is shown.
@Frederick888 Frederick888 marked this pull request as ready for review December 31, 2023 14:45
@benlubas
Copy link
Collaborator

Going to add that this only affects laststatus != 3

@Frederick888 there's a similar issue when you activate a hydra and then create a new window. The new window will also have the hydra hint in the statusline, and this new window never gets updated

With this change it cannot get updated even if you exit the hydra in the window.

here's an example. I activate the hydra, create a new window, and then deactivate the hydra. it (correctly) removes the hint from the original status line, but then the hint is totally stuck in the split window's status line.

hydra.issue.mp4

@benlubas
Copy link
Collaborator

I'd suggest making the hydra hint move along with the user as they move windows with an active hydra. This would take a little more work than what the current PR is doing though.

@benlubas benlubas self-assigned this Dec 31, 2023
@Frederick888
Copy link
Contributor Author

there's a similar issue when you activate a hydra and then create a new window. The new window will also have the hydra hint in the statusline, and this new window never gets updated

With this change it cannot get updated even if you exit the hydra in the window.

Ah yeah... I didn't think about that. And btw with laststatus=3, the status line kinda 'flickers' when you jump between windows at the moment.

I'd suggest making the hydra hint move along with the user as they move windows with an active hydra. This would take a little more work than what the current PR is doing though.

It'd be great if you can help 🙏

@benlubas
Copy link
Collaborator

benlubas commented Jan 1, 2024

Personally I use laststatus=3 and a custom status line hint, which doesn't have this problem.

I do want to support custom status line hints (currently it's only auto generated), so maybe I can take a look at this after that, but right now it's not the biggest priority for me.

@benlubas benlubas added the help wanted Extra attention is needed label Jan 1, 2024
@benlubas benlubas removed their assignment Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants