vim/7.3.796
2013-01-31 12:12:03 +01:00

111 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

To: vim_dev@googlegroups.com
Subject: Patch 7.3.796
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.796
Problem: "/[^\n]" does match at a line break.
Solution: Make it do the same as "/.". (Christian Brabandt)
Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok
*** ../vim-7.3.795/src/regexp.c 2013-01-30 13:59:31.000000000 +0100
--- src/regexp.c 2013-01-30 18:16:12.000000000 +0100
***************
*** 2397,2409 ****
/* '\n' in range: also match NL */
if (ret != JUST_CALC_SIZE)
{
! if (*ret == ANYBUT)
! *ret = ANYBUT + ADD_NL;
! else if (*ret == ANYOF)
*ret = ANYOF + ADD_NL;
/* else: must have had a \n already */
}
- *flagp |= HASNL;
regparse++;
startc = -1;
}
--- 2397,2411 ----
/* '\n' in range: also match NL */
if (ret != JUST_CALC_SIZE)
{
! /* Using \n inside [^] does not change what
! * matches. "[^\n]" is the same as ".". */
! if (*ret == ANYOF)
! {
*ret = ANYOF + ADD_NL;
+ *flagp |= HASNL;
+ }
/* else: must have had a \n already */
}
regparse++;
startc = -1;
}
***************
*** 4344,4349 ****
--- 4346,4352 ----
break; /* Matched with EOW */
case ANY:
+ /* ANY does not match new lines. */
if (c == NUL)
status = RA_NOMATCH;
else
*** ../vim-7.3.795/src/testdir/test79.in 2011-06-19 04:31:54.000000000 +0200
--- src/testdir/test79.in 2013-01-30 17:56:11.000000000 +0100
***************
*** 201,211 ****
--- 201,215 ----
/^TEST/
j:s/A./\=submatch(0)/
j:s/B./\=submatch(0)/
+ /^Q$
+ :s/Q[^\n]Q/\=submatch(0)."foobar"/
ENDTEST
TEST_7:
A
A
BB
+ Q
+ Q
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
*** ../vim-7.3.795/src/testdir/test79.ok 2011-06-19 04:31:54.000000000 +0200
--- src/testdir/test79.ok 2013-01-30 18:05:49.000000000 +0100
***************
*** 115,118 ****
--- 115,120 ----
A
B
B
+ Q
+ Q
*** ../vim-7.3.795/src/version.c 2013-01-30 17:41:43.000000000 +0100
--- src/version.c 2013-01-30 18:19:22.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
{ /* Add new patch number below this line */
+ /**/
+ 796,
/**/
--
FATHER: We are here today to witness the union of two young people in the
joyful bond of the holy wedlock. Unfortunately, one of them, my son
Herbert, has just fallen to his death.
[Murmurs from CROWD; the BRIDE smiles with relief, coughs.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///