|
Karsten Hopp |
538676 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
538676 |
Subject: Patch 7.3.769
|
|
Karsten Hopp |
538676 |
Fcc: outbox
|
|
Karsten Hopp |
538676 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
538676 |
Mime-Version: 1.0
|
|
Karsten Hopp |
538676 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
538676 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
538676 |
------------
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
Patch 7.3.769
|
|
Karsten Hopp |
538676 |
Problem: 'matchpairs' does not work with multi-byte characters.
|
|
Karsten Hopp |
538676 |
Solution: Make it work. (Christian Brabandt)
|
|
Karsten Hopp |
538676 |
Files: src/misc1.c, src/option.c, src/proto/option.pro, src/search.c,
|
|
Karsten Hopp |
538676 |
src/testdir/test69.in, src/testdir/test69.ok
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/misc1.c 2012-08-15 14:04:50.000000000 +0200
|
|
Karsten Hopp |
538676 |
--- src/misc1.c 2013-01-17 15:55:09.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 2288,2301 ****
|
|
Karsten Hopp |
538676 |
*/
|
|
Karsten Hopp |
538676 |
if (p_sm && (State & INSERT)
|
|
Karsten Hopp |
538676 |
&& msg_silent == 0
|
|
Karsten Hopp |
538676 |
- #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
538676 |
- && charlen == 1
|
|
Karsten Hopp |
538676 |
- #endif
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_INS_EXPAND
|
|
Karsten Hopp |
538676 |
&& !ins_compl_active()
|
|
Karsten Hopp |
538676 |
#endif
|
|
Karsten Hopp |
538676 |
)
|
|
Karsten Hopp |
538676 |
! showmatch(c);
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
538676 |
if (!p_ri || (State & REPLACE_FLAG))
|
|
Karsten Hopp |
538676 |
--- 2288,2305 ----
|
|
Karsten Hopp |
538676 |
*/
|
|
Karsten Hopp |
538676 |
if (p_sm && (State & INSERT)
|
|
Karsten Hopp |
538676 |
&& msg_silent == 0
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_INS_EXPAND
|
|
Karsten Hopp |
538676 |
&& !ins_compl_active()
|
|
Karsten Hopp |
538676 |
#endif
|
|
Karsten Hopp |
538676 |
)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
538676 |
! if (has_mbyte)
|
|
Karsten Hopp |
538676 |
! showmatch(mb_ptr2char(buf));
|
|
Karsten Hopp |
538676 |
! else
|
|
Karsten Hopp |
538676 |
! #endif
|
|
Karsten Hopp |
538676 |
! showmatch(c);
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
538676 |
if (!p_ri || (State & REPLACE_FLAG))
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/option.c 2012-12-05 14:42:56.000000000 +0100
|
|
Karsten Hopp |
538676 |
--- src/option.c 2013-01-17 16:38:42.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 6149,6164 ****
|
|
Karsten Hopp |
538676 |
/* 'matchpairs' */
|
|
Karsten Hopp |
538676 |
else if (gvarp == &p_mps)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! /* Check for "x:y,x:y" */
|
|
Karsten Hopp |
538676 |
! for (p = *varp; *p != NUL; p += 4)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ','))
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! errmsg = e_invarg;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
- if (p[3] == NUL)
|
|
Karsten Hopp |
538676 |
- break;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
--- 6149,6194 ----
|
|
Karsten Hopp |
538676 |
/* 'matchpairs' */
|
|
Karsten Hopp |
538676 |
else if (gvarp == &p_mps)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
538676 |
! if (has_mbyte)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! for (p = *varp; *p != NUL; ++p)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! int x2,x3 = -1;
|
|
Karsten Hopp |
538676 |
!
|
|
Karsten Hopp |
538676 |
! if (*p != NUL)
|
|
Karsten Hopp |
538676 |
! p += mb_ptr2len(p);
|
|
Karsten Hopp |
538676 |
! if (*p != NUL)
|
|
Karsten Hopp |
538676 |
! x2 = *p++;
|
|
Karsten Hopp |
538676 |
! if (*p != NUL)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! x3 = mb_ptr2char(p);
|
|
Karsten Hopp |
538676 |
! p += mb_ptr2len(p);
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! if (x2 != ':' || x2 == -1 || x3 == -1
|
|
Karsten Hopp |
538676 |
! || (*p != NUL && *p != ','))
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! errmsg = e_invarg;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! if (*p == NUL)
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! else
|
|
Karsten Hopp |
538676 |
! #endif
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! /* Check for "x:y,x:y" */
|
|
Karsten Hopp |
538676 |
! for (p = *varp; *p != NUL; p += 4)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ','))
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! errmsg = e_invarg;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! if (p[3] == NUL)
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 11453,11455 ****
|
|
Karsten Hopp |
538676 |
--- 11483,11583 ----
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
+
|
|
Karsten Hopp |
538676 |
+ /*
|
|
Karsten Hopp |
538676 |
+ * Check matchpairs option for "*initc".
|
|
Karsten Hopp |
538676 |
+ * If there is a match set "*initc" to the matching character and "*findc" to
|
|
Karsten Hopp |
538676 |
+ * the opposite character. Set "*backwards" to the direction.
|
|
Karsten Hopp |
538676 |
+ * When "switchit" is TRUE swap the direction.
|
|
Karsten Hopp |
538676 |
+ */
|
|
Karsten Hopp |
538676 |
+ void
|
|
Karsten Hopp |
538676 |
+ find_mps_values(initc, findc, backwards, switchit)
|
|
Karsten Hopp |
538676 |
+ int *initc;
|
|
Karsten Hopp |
538676 |
+ int *findc;
|
|
Karsten Hopp |
538676 |
+ int *backwards;
|
|
Karsten Hopp |
538676 |
+ int switchit;
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ char_u *ptr;
|
|
Karsten Hopp |
538676 |
+
|
|
Karsten Hopp |
538676 |
+ ptr = curbuf->b_p_mps;
|
|
Karsten Hopp |
538676 |
+ while (*ptr != NUL)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
538676 |
+ if (has_mbyte)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ char_u *prev;
|
|
Karsten Hopp |
538676 |
+
|
|
Karsten Hopp |
538676 |
+ if (mb_ptr2char(ptr) == *initc)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ if (switchit)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *findc = *initc;
|
|
Karsten Hopp |
538676 |
+ *initc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1);
|
|
Karsten Hopp |
538676 |
+ *backwards = TRUE;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ else
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *findc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1);
|
|
Karsten Hopp |
538676 |
+ *backwards = FALSE;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ return;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ prev = ptr;
|
|
Karsten Hopp |
538676 |
+ ptr += mb_ptr2len(ptr) + 1;
|
|
Karsten Hopp |
538676 |
+ if (mb_ptr2char(ptr) == *initc)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ if (switchit)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *findc = *initc;
|
|
Karsten Hopp |
538676 |
+ *initc = mb_ptr2char(prev);
|
|
Karsten Hopp |
538676 |
+ *backwards = FALSE;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ else
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *findc = mb_ptr2char(prev);
|
|
Karsten Hopp |
538676 |
+ *backwards = TRUE;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ return;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ ptr += mb_ptr2len(ptr);
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ else
|
|
Karsten Hopp |
538676 |
+ #endif
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ if (*ptr == *initc)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ if (switchit)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *backwards = TRUE;
|
|
Karsten Hopp |
538676 |
+ *findc = *initc;
|
|
Karsten Hopp |
538676 |
+ *initc = ptr[2];
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ else
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *backwards = FALSE;
|
|
Karsten Hopp |
538676 |
+ *findc = ptr[2];
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ return;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ ptr += 2;
|
|
Karsten Hopp |
538676 |
+ if (*ptr == *initc)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ if (switchit)
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *backwards = FALSE;
|
|
Karsten Hopp |
538676 |
+ *findc = *initc;
|
|
Karsten Hopp |
538676 |
+ *initc = ptr[-2];
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ else
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ *backwards = TRUE;
|
|
Karsten Hopp |
538676 |
+ *findc = ptr[-2];
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ return;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ ++ptr;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ if (*ptr == ',')
|
|
Karsten Hopp |
538676 |
+ ++ptr;
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/proto/option.pro 2012-12-05 14:42:56.000000000 +0100
|
|
Karsten Hopp |
538676 |
--- src/proto/option.pro 2013-01-17 16:39:30.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 59,62 ****
|
|
Karsten Hopp |
538676 |
--- 59,63 ----
|
|
Karsten Hopp |
538676 |
int check_ff_value __ARGS((char_u *p));
|
|
Karsten Hopp |
538676 |
long get_sw_value __ARGS((void));
|
|
Karsten Hopp |
538676 |
long get_sts_value __ARGS((void));
|
|
Karsten Hopp |
538676 |
+ void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
|
|
Karsten Hopp |
538676 |
/* vim: set ft=c : */
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/search.c 2012-10-03 13:35:45.000000000 +0200
|
|
Karsten Hopp |
538676 |
--- src/search.c 2013-01-17 16:50:12.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 1786,1813 ****
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
else if (initc != '#' && initc != NUL)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! /* 'matchpairs' is "x:y,x:y" */
|
|
Karsten Hopp |
538676 |
! for (ptr = curbuf->b_p_mps; *ptr; ptr += 2)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! if (*ptr == initc)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! findc = initc;
|
|
Karsten Hopp |
538676 |
! initc = ptr[2];
|
|
Karsten Hopp |
538676 |
! backwards = TRUE;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! ptr += 2;
|
|
Karsten Hopp |
538676 |
! if (*ptr == initc)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! findc = initc;
|
|
Karsten Hopp |
538676 |
! initc = ptr[-2];
|
|
Karsten Hopp |
538676 |
! backwards = FALSE;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! if (ptr[1] != ',')
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! if (!findc) /* invalid initc! */
|
|
Karsten Hopp |
538676 |
return NULL;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
/*
|
|
Karsten Hopp |
538676 |
--- 1786,1793 ----
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
else if (initc != '#' && initc != NUL)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! find_mps_values(&initc, &findc, &backwards, TRUE);
|
|
Karsten Hopp |
538676 |
! if (findc == NUL)
|
|
Karsten Hopp |
538676 |
return NULL;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
/*
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 1886,1921 ****
|
|
Karsten Hopp |
538676 |
--pos.col;
|
|
Karsten Hopp |
538676 |
for (;;)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! initc = linep[pos.col];
|
|
Karsten Hopp |
538676 |
if (initc == NUL)
|
|
Karsten Hopp |
538676 |
break;
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
! for (ptr = curbuf->b_p_mps; *ptr; ++ptr)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! if (*ptr == initc)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! findc = ptr[2];
|
|
Karsten Hopp |
538676 |
! backwards = FALSE;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! ptr += 2;
|
|
Karsten Hopp |
538676 |
! if (*ptr == initc)
|
|
Karsten Hopp |
538676 |
! {
|
|
Karsten Hopp |
538676 |
! findc = ptr[-2];
|
|
Karsten Hopp |
538676 |
! backwards = TRUE;
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
! if (!*++ptr)
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! }
|
|
Karsten Hopp |
538676 |
if (findc)
|
|
Karsten Hopp |
538676 |
break;
|
|
Karsten Hopp |
538676 |
! #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
538676 |
! if (has_mbyte)
|
|
Karsten Hopp |
538676 |
! pos.col += (*mb_ptr2len)(linep + pos.col);
|
|
Karsten Hopp |
538676 |
! else
|
|
Karsten Hopp |
538676 |
! #endif
|
|
Karsten Hopp |
538676 |
! ++pos.col;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
if (!findc)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
--- 1866,1879 ----
|
|
Karsten Hopp |
538676 |
--pos.col;
|
|
Karsten Hopp |
538676 |
for (;;)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
! initc = PTR2CHAR(linep + pos.col);
|
|
Karsten Hopp |
538676 |
if (initc == NUL)
|
|
Karsten Hopp |
538676 |
break;
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
! find_mps_values(&initc, &findc, &backwards, FALSE);
|
|
Karsten Hopp |
538676 |
if (findc)
|
|
Karsten Hopp |
538676 |
break;
|
|
Karsten Hopp |
538676 |
! pos.col += MB_PTR2LEN(linep + pos.col);
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
if (!findc)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 2260,2266 ****
|
|
Karsten Hopp |
538676 |
* inquote if the number of quotes in a line is even, unless this
|
|
Karsten Hopp |
538676 |
* line or the previous one ends in a '\'. Complicated, isn't it?
|
|
Karsten Hopp |
538676 |
*/
|
|
Karsten Hopp |
538676 |
! switch (c = linep[pos.col])
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
case NUL:
|
|
Karsten Hopp |
538676 |
/* at end of line without trailing backslash, reset inquote */
|
|
Karsten Hopp |
538676 |
--- 2218,2225 ----
|
|
Karsten Hopp |
538676 |
* inquote if the number of quotes in a line is even, unless this
|
|
Karsten Hopp |
538676 |
* line or the previous one ends in a '\'. Complicated, isn't it?
|
|
Karsten Hopp |
538676 |
*/
|
|
Karsten Hopp |
538676 |
! c = PTR2CHAR(linep + pos.col);
|
|
Karsten Hopp |
538676 |
! switch (c)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
case NUL:
|
|
Karsten Hopp |
538676 |
/* at end of line without trailing backslash, reset inquote */
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 2469,2488 ****
|
|
Karsten Hopp |
538676 |
* Only show match for chars in the 'matchpairs' option.
|
|
Karsten Hopp |
538676 |
*/
|
|
Karsten Hopp |
538676 |
/* 'matchpairs' is "x:y,x:y" */
|
|
Karsten Hopp |
538676 |
! for (p = curbuf->b_p_mps; *p != NUL; p += 2)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
538676 |
! if (*p == c && (curwin->w_p_rl ^ p_ri))
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
#endif
|
|
Karsten Hopp |
538676 |
! p += 2;
|
|
Karsten Hopp |
538676 |
! if (*p == c
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
538676 |
&& !(curwin->w_p_rl ^ p_ri)
|
|
Karsten Hopp |
538676 |
#endif
|
|
Karsten Hopp |
538676 |
)
|
|
Karsten Hopp |
538676 |
break;
|
|
Karsten Hopp |
538676 |
! if (p[1] != ',')
|
|
Karsten Hopp |
538676 |
return;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
--- 2428,2450 ----
|
|
Karsten Hopp |
538676 |
* Only show match for chars in the 'matchpairs' option.
|
|
Karsten Hopp |
538676 |
*/
|
|
Karsten Hopp |
538676 |
/* 'matchpairs' is "x:y,x:y" */
|
|
Karsten Hopp |
538676 |
! for (p = curbuf->b_p_mps; *p != NUL; ++p)
|
|
Karsten Hopp |
538676 |
{
|
|
Karsten Hopp |
538676 |
+ if (PTR2CHAR(p) == c
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
538676 |
! && (curwin->w_p_rl ^ p_ri)
|
|
Karsten Hopp |
538676 |
#endif
|
|
Karsten Hopp |
538676 |
! )
|
|
Karsten Hopp |
538676 |
! break;
|
|
Karsten Hopp |
538676 |
! p += MB_PTR2LEN(p) + 1;
|
|
Karsten Hopp |
538676 |
! if (PTR2CHAR(p) == c
|
|
Karsten Hopp |
538676 |
#ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
538676 |
&& !(curwin->w_p_rl ^ p_ri)
|
|
Karsten Hopp |
538676 |
#endif
|
|
Karsten Hopp |
538676 |
)
|
|
Karsten Hopp |
538676 |
break;
|
|
Karsten Hopp |
538676 |
! p += MB_PTR2LEN(p);
|
|
Karsten Hopp |
538676 |
! if (*p == NUL)
|
|
Karsten Hopp |
538676 |
return;
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/testdir/test69.in 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
538676 |
--- src/testdir/test69.in 2013-01-17 15:55:09.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 1,4 ****
|
|
Karsten Hopp |
538676 |
--- 1,5 ----
|
|
Karsten Hopp |
538676 |
Test for multi-byte text formatting.
|
|
Karsten Hopp |
538676 |
+ Also test, that 'mps' with multibyte chars works.
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
STARTTEST
|
|
Karsten Hopp |
538676 |
:so mbyte.vim
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 134,139 ****
|
|
Karsten Hopp |
538676 |
--- 135,149 ----
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
STARTTEST
|
|
Karsten Hopp |
538676 |
+ /^{/+1
|
|
Karsten Hopp |
538676 |
+ :set mps+=?u2018:?u2019
|
|
Karsten Hopp |
538676 |
+ d%
|
|
Karsten Hopp |
538676 |
+ ENDTEST
|
|
Karsten Hopp |
538676 |
+
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ ‘ two three ’ four
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
+ STARTTEST
|
|
Karsten Hopp |
538676 |
:g/^STARTTEST/.,/^ENDTEST/d
|
|
Karsten Hopp |
538676 |
:1;/^Results/,$wq! test.out
|
|
Karsten Hopp |
538676 |
ENDTEST
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/testdir/test69.ok 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
538676 |
--- src/testdir/test69.ok 2013-01-17 15:55:09.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 140,142 ****
|
|
Karsten Hopp |
538676 |
--- 140,146 ----
|
|
Karsten Hopp |
538676 |
a
|
|
Karsten Hopp |
538676 |
}
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
+
|
|
Karsten Hopp |
538676 |
+ {
|
|
Karsten Hopp |
538676 |
+ four
|
|
Karsten Hopp |
538676 |
+ }
|
|
Karsten Hopp |
538676 |
*** ../vim-7.3.768/src/version.c 2013-01-17 15:36:54.000000000 +0100
|
|
Karsten Hopp |
538676 |
--- src/version.c 2013-01-17 15:55:49.000000000 +0100
|
|
Karsten Hopp |
538676 |
***************
|
|
Karsten Hopp |
538676 |
*** 727,728 ****
|
|
Karsten Hopp |
538676 |
--- 727,730 ----
|
|
Karsten Hopp |
538676 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
538676 |
+ /**/
|
|
Karsten Hopp |
538676 |
+ 769,
|
|
Karsten Hopp |
538676 |
/**/
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
--
|
|
Karsten Hopp |
538676 |
Microsoft's definition of a boolean: TRUE, FALSE, MAYBE
|
|
Karsten Hopp |
538676 |
"Embrace and extend"...?
|
|
Karsten Hopp |
538676 |
|
|
Karsten Hopp |
538676 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
538676 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
538676 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
538676 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|