atom-wordcount icon indicating copy to clipboard operation
atom-wordcount copied to clipboard

Word count changes if a non-active tab is updated

Open johnjcamilleri opened this issue 9 years ago • 1 comments

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 avatar Aug 05 '15 11:08 johnjcamilleri

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

OleMchls avatar Aug 16 '15 20:08 OleMchls