diff --git a/plugin/visual-star-search.vim b/plugin/visual-star-search.vim index d676c02..f7c973e 100644 --- a/plugin/visual-star-search.vim +++ b/plugin/visual-star-search.vim @@ -6,6 +6,7 @@ " search string, vim's search highlight will be wrong. Refactor plz. function! VisualStarSearchSet(cmdtype,...) let temp = @" + let starRegisterContent = @* normal! gvy if !a:0 || a:1 != 'raw' let @" = escape(@", a:cmdtype.'\*') @@ -15,6 +16,7 @@ function! VisualStarSearchSet(cmdtype,...) let @/ = substitute(@/, '\~', '\\~', 'g') let @/ = substitute(@/, '\.', '\\.', 'g') let @" = temp + let @* = starRegisterContent endfunction " replace vim's built-in visual * and # behavior