waymondo / frog-jump-buffer

The fastest buffer-jumping Emacs lisp package around
157 stars 5 forks source link

frog-jump-buffer-current-ignore-buffers incorrectly filters similarly named buffers #27

Closed geza-herman closed 1 year ago

geza-herman commented 1 year ago

frog-jump-buffer-current-ignore-buffers uses the name of current buffer verbatim. This means that if there are other buffers which have a name which contains the name of the current buffer then those buffers will also be filtered. For example, if I'm editing t.py, then mat.py isn't included in the buffer list, because mat.py matches t.py. I fixed this problem like this, but I'm not sure it's the proper way to do it:

  (defun frog-jump-buffer-current-ignore-buffers ()
    (-non-nil
     (append frog-jump-buffer-ignore-buffers
             (list frog-jump-buffer-current-filter-function)
             (unless frog-jump-buffer-include-current-buffer
               (list (concat "\\`" (buffer-name (current-buffer)) "\\'"))))))
waymondo commented 1 year ago

Thanks for the report. I am able to reproduce this when frog-jump-buffer-include-current-buffer is set to nil. Fixed with ab830cb7a5af9429866ba88fb37589a0366d8bf2