Closed nick4f42 closed 2 months ago
Hi, thanks for this!
...which could happen if you killed the buffer a marker pointed to.
When does this happen? Marker registers are usually swapped out with file-query registers when the corresponding buffer is killed. See:
If I create a non-file-visiting buffer "foo", create a mark register in it, then kill "foo", I see the issue. I didn't realize there was a hook to update the register when the buffer is killed, but it looks like it only handles file-visiting buffers:
Maybe Emacs should delete the register if there's no file, but I still think consult should handle the nil buffer case to be safe.
Okay, thanks. Fixed in b48ff6bf0527baeb6bfd07c6da9d303ff0b79c3d. I decided to filter out such invalid registers early on, since they can be considered empty.
Thanks!
The consult register preview would error when a register entry was
#<marker in no buffer>
, which could happen if you killed the buffer a marker pointed to.