Closed a5ob7r closed 7 months ago
ripgrep#observe#add_observer() doesn't add an observer if the first observer for the same event has already been added.
ripgrep#observe#add_observer()
Reproduction steps are as below in Vim 9.1(patches: 1-163).
function! Observer1(_) abort call setqflist([{ 'text': 'Observer1' }], 'a') endfunction function! Observer2(_) abort call setqflist([{ 'text': 'Observer2' }], 'a') endfunction call ripgrep#observe#add_observer('match', 'Observer1') call ripgrep#observe#add_observer('match', 'Observer2') call ripgrep#search('ripgrep') copen " Only "Observer1" are listed in the quickfix window.
@a5ob7r It was a bug. I fixed it so could you try it?
I confirmed it works well. Thank you.
ripgrep#observe#add_observer()
doesn't add an observer if the first observer for the same event has already been added.Reproduction steps are as below in Vim 9.1(patches: 1-163).