1
0
forked from aniani/vim

updated for version 7.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)
This commit is contained in:
Bram Moolenaar
2013-02-20 18:39:13 +01:00
parent 8738fc1be8
commit 187d3acb7f
2 changed files with 5 additions and 5 deletions

View File

@@ -2431,12 +2431,10 @@ showmatch(c)
/* 'matchpairs' is "x:y,x:y" */ /* 'matchpairs' is "x:y,x:y" */
for (p = curbuf->b_p_mps; *p != NUL; ++p) for (p = curbuf->b_p_mps; *p != NUL; ++p)
{ {
if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT #ifdef FEAT_RIGHTLEFT
&& (curwin->w_p_rl ^ p_ri) if (PTR2CHAR(p) == c && (curwin->w_p_rl ^ p_ri))
#endif
)
break; break;
#endif
p += MB_PTR2LEN(p) + 1; p += MB_PTR2LEN(p) + 1;
if (PTR2CHAR(p) == c if (PTR2CHAR(p) == c
#ifdef FEAT_RIGHTLEFT #ifdef FEAT_RIGHTLEFT
@@ -2451,7 +2449,7 @@ showmatch(c)
if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */ if ((lpos = findmatch(NULL, NUL)) == NULL) /* no match, so beep */
vim_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) if (!curwin->w_p_wrap)
getvcol(curwin, lpos, NULL, &vcol, NULL); getvcol(curwin, lpos, NULL, &vcol, NULL);

View File

@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
829,
/**/ /**/
828, 828,
/**/ /**/