1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-02-15 08:50:09 +01:00
slackware-current/source/ap/vim/patches/7.4.045
Patrick J Volkerding 76fc4757ac Slackware 14.1
Mon Nov  4 17:08:47 UTC 2013
Slackware 14.1 x86_64 stable is released!

It's been another interesting release cycle here at Slackware bringing
new features like support for UEFI machines, updated compilers and
development tools, the switch from MySQL to MariaDB, and many more
improvements throughout the system.  Thanks to the team, the upstream
developers, the dedicated Slackware community, and everyone else who
pitched in to help make this release a reality.

The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD.  Please consider supporting the Slackware
project by picking up a copy from store.slackware.com.  We're taking
pre-orders now, and offer a discount if you sign up for a subscription.

Have fun!  :-)
2018-05-31 22:57:36 +02:00

111 lines
3.1 KiB
Text
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.4.045
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.4.045
Problem: substitute() does not work properly when the pattern starts with
"\ze".
Solution: Detect an empty match. (Christian Brabandt)
Files: src/eval.c, src/testdir/test80.in, src/testdir/test80.ok
*** ../vim-7.4.044/src/eval.c 2013-09-25 21:00:24.000000000 +0200
--- src/eval.c 2013-09-29 21:03:22.000000000 +0200
***************
*** 24301,24306 ****
--- 24301,24307 ----
garray_T ga;
char_u *ret;
char_u *save_cpo;
+ int zero_width;
/* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
save_cpo = p_cpo;
***************
*** 24339,24358 ****
(void)vim_regsub(&regmatch, sub, (char_u *)ga.ga_data
+ ga.ga_len + i, TRUE, TRUE, FALSE);
ga.ga_len += i + sublen - 1;
! /* avoid getting stuck on a match with an empty string */
! if (tail == regmatch.endp[0])
{
! if (*tail == NUL)
! break;
*((char_u *)ga.ga_data + ga.ga_len) = *tail++;
++ga.ga_len;
}
- else
- {
- tail = regmatch.endp[0];
- if (*tail == NUL)
- break;
- }
if (!do_all)
break;
}
--- 24340,24356 ----
(void)vim_regsub(&regmatch, sub, (char_u *)ga.ga_data
+ ga.ga_len + i, TRUE, TRUE, FALSE);
ga.ga_len += i + sublen - 1;
! zero_width = (tail == regmatch.endp[0]
! || regmatch.startp[0] == regmatch.endp[0]);
! tail = regmatch.endp[0];
! if (*tail == NUL)
! break;
! if (zero_width)
{
! /* avoid getting stuck on a match with an empty string */
*((char_u *)ga.ga_data + ga.ga_len) = *tail++;
++ga.ga_len;
}
if (!do_all)
break;
}
*** ../vim-7.4.044/src/testdir/test80.in 2013-03-19 17:30:51.000000000 +0100
--- src/testdir/test80.in 2013-09-29 20:59:00.000000000 +0200
***************
*** 142,147 ****
--- 142,149 ----
:$put =\"\n\nTEST_7:\"
:$put =substitute('A
A', 'A.', '\=submatch(0)', '')
:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
+ :$put =substitute('-bb', '\zeb', 'a', 'g')
+ :$put =substitute('-bb', '\ze', 'c', 'g')
/^TEST_8
ENDTEST
*** ../vim-7.4.044/src/testdir/test80.ok 2013-03-19 17:31:45.000000000 +0100
--- src/testdir/test80.ok 2013-09-29 20:59:35.000000000 +0200
***************
*** 103,108 ****
--- 103,110 ----
A
A
B
B
+ -abab
+ c-cbcbc
TEST_8:
*** ../vim-7.4.044/src/version.c 2013-09-29 19:05:17.000000000 +0200
--- src/version.c 2013-09-29 21:04:50.000000000 +0200
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 45,
/**/
--
Just think of all the things we haven't thought of yet.
/// 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 ///