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

Word count changes if a non-active tab is updated #36

Open
johnjcamilleri opened this issue Aug 5, 2015 · 1 comment
Open

Word count changes if a non-active tab is updated #36

johnjcamilleri opened this issue Aug 5, 2015 · 1 comment

Comments

@johnjcamilleri
Copy link

I have two tabs open, main.tex (active) and main.log.
When I compile my TeX file outside of Atom, main.log changes. Atom automatically refreshes the file contents even though that file tab is not active, but the word count indicator in the status bar changes too! Even though I am still viewing main.tex, the indicator now shows me the word count of main.log, even though that tab is not active.

@johnjcamilleri johnjcamilleri changed the title Word count changes if the non-active file is updated Word count changes if a non-active tab is updated Aug 5, 2015
@OleMchls
Copy link
Owner

Hey @johnjcamilleri that indeed sounds like a bug, and my guess for the caue is that the view is updated on keystoke events https://github.com/nesQuick/atom-wordcount/blob/master/lib/main.coffee#L27-L28 so there is no eventlistener for a fs file change. But it can be implemented, this might be a good starting point: https://atom.io/docs/api/v1.0.7/TextEditor#instance-onDidChange

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants