diff options
author | Teddy Wing | 2020-02-04 22:00:32 +0100 |
---|---|---|
committer | Teddy Wing | 2020-02-04 22:00:32 +0100 |
commit | 15fca46f502c541041788f96512f8a1a92b7fd57 (patch) | |
tree | 0814fbdbfb1bf42044ac2e0be8661d135486da09 /autoload | |
parent | ac01d7a97118519f49221a49cc25640b2aba7cc8 (diff) | |
download | vim-searchop-15fca46f502c541041788f96512f8a1a92b7fd57.tar.bz2 |
Search(): Use `feedkeys` instead of `normal!` to advance search
Because of `:h function-search-undo`, using `normal! n` at the end of
the function doesn't highlight the matches with 'hlsearch' (though it
does advance to the next match).
I've seen other mappings that add a `/<CR>` or `n` to the end of the
mapping, but that doesn't work here because it's an operator, so `g@`
needs to be the last thing in the mapping. And I was reluctant to work
out how to make it an `<expr>` mapping.
Fortunately, search highlighting works when `n` is used with
`feedkeys()`.
Diffstat (limited to 'autoload')
0 files changed, 0 insertions, 0 deletions