Fix pattern matching for results buffer name

This fixes issue with different buffers sharing the same results window
when their buffer numbers are similar. For example 1 & 10.