~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to src/regexp.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4532
4532
                cleanup_subexpr();
4533
4533
                if (!REG_MULTI)         /* Single-line regexp */
4534
4534
                {
4535
 
                    if (reg_endp[no] == NULL)
 
4535
                    if (reg_startp[no] == NULL || reg_endp[no] == NULL)
4536
4536
                    {
4537
4537
                        /* Backref was not set: Match an empty string. */
4538
4538
                        len = 0;
4548
4548
                }
4549
4549
                else                            /* Multi-line regexp */
4550
4550
                {
4551
 
                    if (reg_endpos[no].lnum < 0)
 
4551
                    if (reg_startpos[no].lnum < 0 || reg_endpos[no].lnum < 0)
4552
4552
                    {
4553
4553
                        /* Backref was not set: Match an empty string. */
4554
4554
                        len = 0;
7279
7279
    }
7280
7280
    else
7281
7281
    {
7282
 
        if (submatch_match->endp[no] == NULL)
 
7282
        s = submatch_match->startp[no];
 
7283
        if (s == NULL || submatch_match->endp[no] == NULL)
7283
7284
            retval = NULL;
7284
7285
        else
7285
 
        {
7286
 
            s = submatch_match->startp[no];
7287
7286
            retval = vim_strnsave(s, (int)(submatch_match->endp[no] - s));
7288
 
        }
7289
7287
    }
7290
7288
 
7291
7289
    return retval;