Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

:EnvimUsesOfSymbolAtPoint only works once #10

Open
megaannum opened this issue Apr 25, 2012 · 2 comments
Open

:EnvimUsesOfSymbolAtPoint only works once #10

megaannum opened this issue Apr 25, 2012 · 2 comments
Labels

Comments

@megaannum
Copy link

Start vim and enter :Envim. After fulltypechecking, put cursor on classname
and enter :EnvimUsesOfSymbolAtPoint. Quickfix window opens with all
uses of the class (and syntax color highlighting goes away). Close
Quickfix window and repeat (put cursor on classname and enter
:EnvimUsesOfSymbolAtPoint). Nothing is displayed, no Quickfix window.
Now there is traffic in the log files but nothing is generated on the screen.

@megaannum
Copy link
Author

Ok, seems like the problem is I would close the QuickFix window after using it (:q)
and Envim once the QuickFix window is closed will not re-open it. I assume everything
else with regards to :EnvimUsesOfSymbolAtPoint works but when it comes time
to write to the closed QuickFix window, nothing happens: no errors or anything.
So, I can work with always having a QuickFix window open, but I still think its
a bug that Envim does not re-create it if the user happens to close it.

@jlc
Copy link
Owner

jlc commented Apr 27, 2012

You are true, there is a bug lying here, here is what happend:

When a reply from ensime is received (in TypecheckFileHandler, TypecheckAllHandler, UsesOfSymbolAtPointHandler), the quickfix list is filled up and opened, as well as a isOpen flag is set.

Unfortunately, the vim event BufWinLeave is not triggered when users are closing it, which does not reset the flag.
You know what follow...

However, the quickfixlist is properly filled up any time you execute the command :EnvimUsesOfSymbolAtPoint, it is simply not opened.
You can open it with :copen (and close it with :cclose).

I am testing in order to avoid another bug linked to this situation and shall push a patch soon.

jlc pushed a commit that referenced this issue Apr 27, 2012
Unfortunately, BufWinLeave is not triggered on the quickfix list, which
make it annoying to track if the window has been closed.

Therefore, simply remove all tracking of the state of the quickfix list,
and open each time is necessary.
This also remove the burden of tracking the tab number in which has been
opened.

Take the opportunity to fix properly the "non-styling" of the
quickfix list by forcing line number and cursor line to be off.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants