emacs-helm/helm — pull request #671 by tuhdo (2014-10-22 08:50:02+00:00)
Title: Fix a bug where Semantic buffer is empty

When a buffer is modified, it has to be re-parsed by Semantic to get a
new list of tags. This needs to be done when helm-source-semantic is at
"init" phase - to do this in current buffer - then pass the result to
"candidate" phase. When helm-source-semantic gets to "candidate" phase,
we are already in a Helm buffer and re-parsing at this stage is late. If we
modify a large portion of buffer and re-parse at "candidate" stage, we
only get an empty helm-semantic buffer.

For example, to reproduce this issue:

- "C-x h" to mark all helm.el content.
- Paste the same content into the same helm.el buffer.
- Run helm-semantic-or-imenu and see an empty buffer.

For this reason, add back helm-semantic--maybe-set-needs-update and
perform tag fetching at "init" phase. "candidates" should only get
processed candidates