summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-02-20 18:39:13 +0100
committerBram Moolenaar <Bram@vim.org>2013-02-20 18:39:13 +0100
commit187d3acb7fbb82266802db9dc3c659f8b725fbd0 (patch)
tree1d1957548565993fb3a151743786b1225a04609f /src/search.c
parent8738fc1be888d73fb4fe302cf085c0bcf4f52e91 (diff)
downloadvim-git-187d3acb7fbb82266802db9dc3c659f8b725fbd0.tar.gz
updated for version 7.3.829v7.3.829
Problem: When compiled with the +rightleft feature 'showmatch' also shows a match for the opening paren. When 'revins' is set the screen may scroll. Solution: Only check the opening paren when the +rightleft feature was enabled. Do not show a match that is not visible. (partly by Christian Brabandt)
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/search.c b/src/search.c
index 24b0c4a82..fc7468046 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2431,12 +2431,10 @@ showmatch(c)
/* 'matchpairs' is "x:y,x:y" */
for (p = curbuf->b_p_mps; *p != NUL; ++p)
{
- if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
- && (curwin->w_p_rl ^ p_ri)
-#endif
- )
+ if (PTR2CHAR(p) == c && (curwin->w_p_rl ^ p_ri))
break;
+#endif
p += MB_PTR2LEN(p) + 1;
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT
@@ -2451,7 +2449,7 @@ showmatch(c)
if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */
vim_beep();
- else if (lpos->lnum >= curwin->w_topline)
+ else if (lpos->lnum >= curwin->w_topline && lpos->lnum < curwin->w_botline)
{
if (!curwin->w_p_wrap)
getvcol(curwin, lpos, NULL, &vcol, NULL);