aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-10-19 09:39:51 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-10-19 09:39:51 -0400
commitea01c40f520dd532401c1d92c4c78295911943b1 (patch)
tree305b7e72e04b30be2ed052df262ab6b771e7469d /src/nvim/search.c
parente9de70e4ea53cd7ab70eba0757309004c61c3c62 (diff)
parent3bb266266935e9bf95f4a776b33800b9303d4607 (diff)
downloadrneovim-ea01c40f520dd532401c1d92c4c78295911943b1.tar.gz
rneovim-ea01c40f520dd532401c1d92c4c78295911943b1.tar.bz2
rneovim-ea01c40f520dd532401c1d92c4c78295911943b1.zip
Merge pull request #3466 from johanhelsing/vim-7.4.793
vim-patch:7.4.793
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 8ba888841c..a44b0e00c7 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -2052,11 +2052,13 @@ showmatch (
return;
}
- if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */
- vim_beep();
- else if (lpos->lnum >= curwin->w_topline && lpos->lnum < curwin->w_botline) {
- if (!curwin->w_p_wrap)
+ if ((lpos = findmatch(NULL, NUL)) == NULL) { // no match, so beep
+ vim_beep(BO_MATCH);
+ } else if (lpos->lnum >= curwin->w_topline
+ && lpos->lnum < curwin->w_botline) {
+ if (!curwin->w_p_wrap) {
getvcol(curwin, lpos, NULL, &vcol, NULL);
+ }
if (curwin->w_p_wrap || (vcol >= curwin->w_leftcol
&& vcol < curwin->w_leftcol + curwin->w_width)) {
mpos = *lpos; /* save the pos, update_screen() may change it */