Fix to handle last-patten with incsearch#magic

fix #54
Merge branch 'fix-lastpattern-with-magic' into dev