Previously, a buffer local variable was set with a global idle timer.
This caused the following bugs:
If the first buffer to open wc-mode (assuming loading wc-mode is
deferred) is closed, wc-mode would no longer update in any buffer.
The logic for wc mode would run on every `current-buffer', causing
slowdowns even after wc-mode is disabled.
The simple fix for both of these is to run a single global idle timer
which only runs on wc-mode buffers, instead of many buffer local
timers. However, if the user types in many wc-mode buffers, only the
latest one will update. However, I'm mostly interested in fixing the
performance issue and the bug where wc-mode will completely break, so
I'll keep this simple for now.
Previously, a buffer local variable was set with a global idle timer. This caused the following bugs:
The simple fix for both of these is to run a single global idle timer which only runs on wc-mode buffers, instead of many buffer local timers. However, if the user types in many wc-mode buffers, only the latest one will update. However, I'm mostly interested in fixing the performance issue and the bug where wc-mode will completely break, so I'll keep this simple for now.