Loading ...
Sorry, an error occurred while loading the content.

Patch 7.3.851

Expand Messages
  • Bram Moolenaar
    Patch 7.3.851 Problem: Using an empty pattern with :sort silently continues when there is no previous search pattern. Solution: Give an error message.
    Message 1 of 1 , Mar 7, 2013
    • 0 Attachment
      Patch 7.3.851
      Problem: Using an empty pattern with :sort silently continues when there is
      no previous search pattern.
      Solution: Give an error message.
      Files: src/ex_cmds.c


      *** ../vim-7.3.850/src/ex_cmds.c 2013-03-07 16:08:31.000000000 +0100
      --- src/ex_cmds.c 2013-03-07 16:25:28.000000000 +0100
      ***************
      *** 415,422 ****
      }
      *s = NUL;
      /* Use last search pattern if sort pattern is empty. */
      ! if (s == p + 1 && last_search_pat() != NULL)
      regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
      else
      regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC);
      if (regmatch.regprog == NULL)
      --- 415,429 ----
      }
      *s = NUL;
      /* Use last search pattern if sort pattern is empty. */
      ! if (s == p + 1)
      ! {
      ! if (last_search_pat() == NULL)
      ! {
      ! EMSG(_(e_noprevre));
      ! goto sortend;
      ! }
      regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
      + }
      else
      regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC);
      if (regmatch.regprog == NULL)
      *** ../vim-7.3.850/src/version.c 2013-03-07 16:32:49.000000000 +0100
      --- src/version.c 2013-03-07 16:38:49.000000000 +0100
      ***************
      *** 730,731 ****
      --- 730,733 ----
      { /* Add new patch number below this line */
      + /**/
      + 851,
      /**/

      --
      This planet has -- or rather had -- a problem, which was this: most
      of the people living on it were unhappy for pretty much of the time.
      Many solutions were suggested for this problem, but most of these
      were largely concerned with the movements of small green pieces of
      paper, which is odd because on the whole it wasn't the small green
      pieces of paper that were unhappy.
      -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

      /// Bram Moolenaar -- Bram@... -- 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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.