]> code.delx.au - gnu-emacs-elpa/commit
Simplify counsel-git-grep logic
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 27 Jul 2015 09:51:08 +0000 (11:51 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 27 Jul 2015 10:00:26 +0000 (12:00 +0200)
commit5ae677c092d48caf10b6baa3a7ca32d3eea6b55f
treea6562177dee9b6a2046a1aa154dbf5daa9a5b2c1
parentf71a56202bf98cdcf100db73110425ade0622d9b
Simplify counsel-git-grep logic

* ivy.el (ivy--exhibit): Remove the condition on (eq ivy--full-length -1).

* counsel.el (counsel-git-grep-function): Simplify.
(counsel-gg-state): New defvar. Use this instead of
(setq ivy--full-length -1).
(counsel--gg-candidates): Set `counsel-gg-state' to -2. There are two
async processes to wait for until `ivy--exhibit' can be called:
- get the candidate count
- get the candidates
Each of the async processes will increase the number, and call
`ivy--exhibit' if the number reaches 0.
(counsel--gg-sentinel): Update.
(counsel--gg-count): Update.
counsel.el
ivy.el