Open mentalisttraceur opened 1 year ago
aw--done goes through the buffers in aw-empty-buffers-list, but doesn't handle the possibility of them getting killed since they were added to the list.
aw--done
aw-empty-buffers-list
aw--done could fix this with a simple buffer-live-p check:
buffer-live-p
(dolist (b aw-empty-buffers-list) + (when (buffer-live-p b) (with-current-buffer b (when (string= (buffer-string) " ") (let ((inhibit-read-only t)) (delete-region (point-min) (point-max)))))) + )
In the meantime, for anyone else hitting this problem, here's the workaround I'm using:
(defun fixed-aw--done (&rest _) (setq aw-empty-buffers-list (seq-filter 'buffer-live-p aw-empty-buffers-list))) (advice-add 'aw--done :before 'fixed-aw--done)
aw--done
goes through the buffers inaw-empty-buffers-list
, but doesn't handle the possibility of them getting killed since they were added to the list.aw--done
could fix this with a simplebuffer-live-p
check:In the meantime, for anyone else hitting this problem, here's the workaround I'm using: