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

Close hover documentation when cursor leaves the symbol #326

Closed
teenjuna opened this issue Jun 20, 2021 · 7 comments · Fixed by #1285
Closed

Close hover documentation when cursor leaves the symbol #326

teenjuna opened this issue Jun 20, 2021 · 7 comments · Fixed by #1285
Assignees
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@teenjuna
Copy link
Contributor

Currently when we press K to open documentation for the symbol under the cursor and then move the cursor somewhere else, the documentation doesn't disappear and follows the cursor:

Screen.Recording.2021-06-20.at.17.52.45.mov

I find this somewhat counter-intuitive. I expect it to disappear as soon as the cursor leaves the symbol. Is it intentional or should we try to fix this?

Environment

  • Platform: macOS
  • Helix version: v0.2.1-49-g2cbec2b
@teenjuna teenjuna added the C-bug Category: This is a bug label Jun 20, 2021
@archseer
Copy link
Member

Would like to fix this but I might want to add a proper hook system first so these things can be properly abstracted.

@archseer
Copy link
Member

Quick workaround would probably be Event::Ignored also taking a callback so we could catch the key in handle_event, ignore it, but still trigger a close.

@archseer archseer self-assigned this Jun 20, 2021
@archseer archseer added the A-helix-term Area: Helix term improvements label Jun 23, 2021
@jens1205
Copy link

With hx v0.4.1 on Mac, the hover is not following the cursor any more - but it does not close either. So I can open a lot of hover documentation for different items the same time.

But nothing closes if I move the cursor away, what is what I expect. So how is the documentation closed?

@archseer
Copy link
Member

Esc

@jens1205
Copy link

Indeed, this works. I haven't noticed, because I first tried to close / toggle the hover documentation again with K. But this apparently leads to another instance of the hover window to be placed "on top" of the other. And after pressing twice K, you have to press twice Esc.

Even more strange is the behaviour if you enter into insert mode while having one or more hover windows open. Now Esc does not switch to normal mode, but instead you first have to close all hover windows before you can leave insert mode.

I don't think this beaviour is wanted. Either the hover window should be closed upon cursor movement. Or the window should be toggable via K.

@kirawi
Copy link
Member

kirawi commented Oct 12, 2021

Duplicate of #14

@kirawi kirawi marked this as a duplicate of #14 Oct 12, 2021
@kirawi kirawi closed this as completed Oct 12, 2021
@kirawi kirawi added the R-duplicate Duplicated issue: please refer to the linked issue label Oct 12, 2021
@kirawi
Copy link
Member

kirawi commented Dec 7, 2021

Nevermind, it's not a duplicate.

@kirawi kirawi reopened this Dec 7, 2021
@kirawi kirawi removed the R-duplicate Duplicated issue: please refer to the linked issue label Dec 7, 2021
@kirawi kirawi marked this as not a duplicate of #14 Dec 7, 2021
@kirawi kirawi assigned kirawi and unassigned kirawi Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants