Christian Brabandt wrote:
> On Mi, 20 Feb 2013, char101 wrote:
>
> > Hi,
> >
> > I believe some change in patch 7.3.769 causes showmatch behaviour to change
> >
> > Test case
> >
> > - Start with an empty buffer
> > - Type ) in line &lines + 10 (the number of lines visible + 10)
> > - Go to line 1
> > - Type ( in line 5
> >
> > - The screen will scroll so that line 5 is now the first visible line
>
>
> Hm, I don't remember messing with that. I think, this happens, because
> before 7.3.769 we only jumped when closing braces were inserted and now
> we jump also on opening braces. Anyways, here is a patch, that makes
> sure a jump is only done, when the matching brace is visible on the
> screen.
>
> diff --git a/src/search.c b/src/search.c
> --- a/src/search.c
> +++ b/src/search.c
> @@ -2451,8 +2451,9 @@
>
> 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_topline + curwin->w_height)
> {
> + /* only jump to the matching brace, if it is within the current
> screen */
> if (!curwin->w_p_wrap)
> getvcol(curwin, lpos, NULL, &vcol, NULL);
> if (curwin->w_p_wrap || (vcol >= curwin->w_leftcol
This actually is a bug in patch 7.3.769. The FEAT_RIGHTLEFT check is
done wrong, thus when the rightleft feature is compiled in it only shows
a match for ")", when the feature is missing it also shows a match for
"(". That should not happen, Vim beeps every time you type a "(" that
doesn't have a match.
I'll fix it. Your change is also needed, for when 'revins' is set.
But we need to compare against w_botline.
--
Eye have a spelling checker, it came with my PC;
It plainly marks four my revue mistakes I cannot sea.
I've run this poem threw it, I'm sure your please to no,
It's letter perfect in it's weigh, my checker tolled me sew!
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.