Fix: (--value-at) Clear value cache when buffer changes

Fixes #59.  Thanks to Daniel Hubmann (@hubisan) for reporting.
This commit is contained in:
Adam Porter 2019-11-24 05:43:21 -06:00
parent 02159a831a
commit a1851ed0eb
2 changed files with 21 additions and 1 deletions

View file

@ -470,7 +470,8 @@ Values compared with `equal'."
buffer-unmodified-p (eq (buffer-modified-tick) modified-tick))
(unless (and buffer-cache buffer-unmodified-p)
;; Buffer-local node cache empty or invalid: make new one.
(setf position-cache (make-hash-table))
(setf position-cache (make-hash-table)
value-cache (gethash position position-cache))
(puthash (current-buffer)
(cons (buffer-modified-tick) position-cache)
org-ql-node-value-cache))