]> git.pld-linux.org Git - packages/vim.git/commitdiff
- official patches
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 17 Sep 2008 14:53:05 +0000 (14:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    7.2.014 -> 1.1
    7.2.015 -> 1.1
    7.2.016 -> 1.1
    7.2.017 -> 1.1
    7.2.018 -> 1.1

7.2.014 [new file with mode: 0644]
7.2.015 [new file with mode: 0644]
7.2.016 [new file with mode: 0644]
7.2.017 [new file with mode: 0644]
7.2.018 [new file with mode: 0644]

diff --git a/7.2.014 b/7.2.014
new file mode 100644 (file)
index 0000000..a037948
--- /dev/null
+++ b/7.2.014
@@ -0,0 +1,52 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.014
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.014
+Problem:    synstack() doesn't work in an emptly line.
+Solution:   Accept column zero as a valid position.
+Files:     src/eval.c
+
+
+*** ../vim-7.2.013/src/eval.c  Sun Sep  7 13:54:31 2008
+--- src/eval.c Sun Sep  7 13:50:38 2008
+***************
+*** 16667,16673 ****
+      col = get_tv_number(&argvars[1]) - 1;    /* -1 on type error */
+  
+      if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
+!          && col >= 0 && col < (long)STRLEN(ml_get(lnum))
+           && rettv_list_alloc(rettv) != FAIL)
+      {
+       (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE);
+--- 16667,16673 ----
+      col = get_tv_number(&argvars[1]) - 1;    /* -1 on type error */
+  
+      if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
+!          && col >= 0 && (col == 0 || col < (long)STRLEN(ml_get(lnum)))
+           && rettv_list_alloc(rettv) != FAIL)
+      {
+       (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE);
+*** ../vim-7.2.013/src/version.c       Sun Sep  7 21:47:51 2008
+--- src/version.c      Wed Sep 10 15:36:52 2008
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     14,
+  /**/
+
+-- 
+Everybody lies, but it doesn't matter since nobody listens.
+                                -- Lieberman's Law
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
diff --git a/7.2.015 b/7.2.015
new file mode 100644 (file)
index 0000000..e03ac15
--- /dev/null
+++ b/7.2.015
@@ -0,0 +1,82 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.015
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.015
+Problem:    "make all test install" doesn't stop when the test fails. (Daniel
+           Shahaf)
+Solution:   When test.log contains failures exit with non-zero status.
+Files:     src/testdir/Makefile
+
+
+*** ../vim-7.2.014/src/testdir/Makefile        Wed Jun 25 00:22:53 2008
+--- src/testdir/Makefile       Sun Sep  7 21:31:49 2008
+***************
+*** 26,40 ****
+  
+  .SUFFIXES: .in .out
+  
+! nongui:      nolog $(SCRIPTS)
+!      @echo
+!      @cat test.log
+!      @echo ALL DONE
+  
+! gui: nolog $(SCRIPTS) $(SCRIPTS_GUI)
+       @echo
+!      @cat test.log
+!      @echo ALL DONE
+  
+  $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
+  
+--- 26,42 ----
+  
+  .SUFFIXES: .in .out
+  
+! nongui:      nolog $(SCRIPTS) report
+! 
+! gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) report
+  
+! report:
+       @echo
+!      @echo 'Test results:'
+!      @/bin/sh -c "if test -f test.log; \
+!              then cat test.log; echo TEST FAILURE; exit 1; \
+!              else echo ALL DONE; \
+!              fi"
+  
+  $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
+  
+***************
+*** 71,74 ****
+  test60.out: test60.vim
+  
+  nolog:
+!      -echo Test results: >test.log
+--- 73,76 ----
+  test60.out: test60.vim
+  
+  nolog:
+!      -rm -f test.log
+*** ../vim-7.2.014/src/version.c       Wed Sep 10 15:38:13 2008
+--- src/version.c      Wed Sep 10 18:23:38 2008
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     15,
+  /**/
+
+-- 
+Light travels faster than sound.  This is why some people
+appear bright until you hear them speak
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
diff --git a/7.2.016 b/7.2.016
new file mode 100644 (file)
index 0000000..03d5207
--- /dev/null
+++ b/7.2.016
@@ -0,0 +1,166 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.016
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.016
+Problem:    The pattern being completed may be in freed memory when the
+           command line is being reallocated. (Dominique Pelle)
+Solution:   Keep a pointer to the expand_T in the command line structure.
+           Don't use <S-Tab> as CTRL-P when there are no results.  Clear the
+           completion when using a command line from the history.
+Files:     src/ex_getln.c
+
+
+*** ../vim-7.2.015/src/ex_getln.c      Fri Aug  8 12:58:59 2008
+--- src/ex_getln.c     Wed Sep 10 22:43:41 2008
+***************
+*** 31,36 ****
+--- 31,38 ----
+      int              cmdattr;        /* attributes for prompt */
+      int              overstrike;     /* Typing mode on the command line.  Shared by
+                                  getcmdline() and put_on_cmdline(). */
++     expand_T *xpc;           /* struct being used for expansion, xp_pattern
++                                 may point into cmdbuff */
+      int              xp_context;     /* type of expansion */
+  # ifdef FEAT_EVAL
+      char_u   *xp_arg;        /* user-defined expansion arg */
+***************
+*** 38,44 ****
+  # endif
+  };
+  
+! static struct cmdline_info ccline;   /* current cmdline_info */
+  
+  static int   cmd_showtail;           /* Only show path tail in lists ? */
+  
+--- 40,50 ----
+  # endif
+  };
+  
+! /* The current cmdline_info.  It is initialized in getcmdline() and after that
+!  * used by other functions.  When invoking getcmdline() recursively it needs
+!  * to be saved with save_cmdline() and restored with restore_cmdline().
+!  * TODO: make it local to getcmdline() and pass it around. */
+! static struct cmdline_info ccline;
+  
+  static int   cmd_showtail;           /* Only show path tail in lists ? */
+  
+***************
+*** 238,243 ****
+--- 244,250 ----
+      }
+  
+      ExpandInit(&xpc);
++     ccline.xpc = &xpc;
+  
+  #ifdef FEAT_RIGHTLEFT
+      if (curwin->w_p_rl && *curwin->w_p_rlc == 's'
+***************
+*** 408,416 ****
+  #endif
+  
+       /*
+!       * <S-Tab> works like CTRL-P (unless 'wc' is <S-Tab>).
+        */
+!      if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles != -1)
+           c = Ctrl_P;
+  
+  #ifdef FEAT_WILDMENU
+--- 415,424 ----
+  #endif
+  
+       /*
+!       * When there are matching completions to select <S-Tab> works like
+!       * CTRL-P (unless 'wc' is <S-Tab>).
+        */
+!      if (c != p_wc && c == K_S_TAB && xpc.xp_numfiles > 0)
+           c = Ctrl_P;
+  
+  #ifdef FEAT_WILDMENU
+***************
+*** 1513,1518 ****
+--- 1521,1527 ----
+                   int         old_firstc;
+  
+                   vim_free(ccline.cmdbuff);
++                  xpc.xp_context = EXPAND_NOTHING;
+                   if (hiscnt == hislen)
+                       p = lookfor;    /* back to the old one */
+                   else
+***************
+*** 1839,1844 ****
+--- 1848,1854 ----
+  #endif
+  
+      ExpandCleanup(&xpc);
++     ccline.xpc = NULL;
+  
+  #ifdef FEAT_SEARCH_EXTRA
+      if (did_incsearch)
+***************
+*** 2508,2513 ****
+--- 2518,2537 ----
+      }
+      mch_memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen + 1);
+      vim_free(p);
++ 
++     if (ccline.xpc != NULL
++          && ccline.xpc->xp_pattern != NULL
++          && ccline.xpc->xp_context != EXPAND_NOTHING
++          && ccline.xpc->xp_context != EXPAND_UNSUCCESSFUL)
++     {
++      int i = ccline.xpc->xp_pattern - p;
++ 
++      /* If xp_pattern points inside the old cmdbuff it needs to be adjusted
++       * to point into the newly allocated memory. */
++      if (i >= 0 && i <= ccline.cmdlen)
++          ccline.xpc->xp_pattern = ccline.cmdbuff + i;
++     }
++ 
+      return OK;
+  }
+  
+***************
+*** 2875,2880 ****
+--- 2899,2905 ----
+      prev_ccline = ccline;
+      ccline.cmdbuff = NULL;
+      ccline.cmdprompt = NULL;
++     ccline.xpc = NULL;
+  }
+  
+  /*
+***************
+*** 3582,3587 ****
+--- 3607,3613 ----
+  ExpandInit(xp)
+      expand_T *xp;
+  {
++     xp->xp_pattern = NULL;
+      xp->xp_backslash = XP_BS_NONE;
+  #ifndef BACKSLASH_IN_FILENAME
+      xp->xp_shell = FALSE;
+*** ../vim-7.2.015/src/version.c       Wed Sep 10 18:25:18 2008
+--- src/version.c      Sun Sep 14 14:38:47 2008
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     16,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+53. To find out what time it is, you send yourself an e-mail and check the
+    "Date:" field.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
diff --git a/7.2.017 b/7.2.017
new file mode 100644 (file)
index 0000000..99979a1
--- /dev/null
+++ b/7.2.017
@@ -0,0 +1,162 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.017
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.017
+Problem:    strlen() used on text that may not end in a NUL. (Dominique Pelle)
+           Pasting a very big selection doesn't work.
+Solution:   Use the length passed to the XtSelectionCallbackProc() function.
+           After getting the SelectionNotify event continue dispatching
+           events until the callback is actually called.  Also dispatch the
+           PropertyNotify event.
+Files:     src/ui.c
+
+
+*** ../vim-7.2.016/src/ui.c    Sun Sep  7 21:47:51 2008
+--- src/ui.c   Sun Sep 14 15:52:19 2008
+***************
+*** 2020,2026 ****
+  
+      if (value == NULL || *length == 0)
+      {
+!      clip_free_selection(cbd);       /* ???  [what's the query?] */
+       *(int *)success = FALSE;
+       return;
+      }
+--- 2020,2026 ----
+  
+      if (value == NULL || *length == 0)
+      {
+!      clip_free_selection(cbd);       /* nothing received, clear register */
+       *(int *)success = FALSE;
+       return;
+      }
+***************
+*** 2076,2082 ****
+       text_prop.value = (unsigned char *)value;
+       text_prop.encoding = *type;
+       text_prop.format = *format;
+!      text_prop.nitems = STRLEN(value);
+       status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop,
+                                                        &text_list, &n_text);
+       if (status != Success || n_text < 1)
+--- 2076,2082 ----
+       text_prop.value = (unsigned char *)value;
+       text_prop.encoding = *type;
+       text_prop.format = *format;
+!      text_prop.nitems = len;
+       status = XmbTextPropertyToTextList(X_DISPLAY, &text_prop,
+                                                        &text_list, &n_text);
+       if (status != Success || n_text < 1)
+***************
+*** 2131,2137 ****
+           case 3:  type = text_atom;          break;
+           default: type = XA_STRING;
+       }
+!      success = FALSE;
+       XtGetSelectionValue(myShell, cbd->sel_atom, type,
+           clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime);
+  
+--- 2131,2137 ----
+           case 3:  type = text_atom;          break;
+           default: type = XA_STRING;
+       }
+!      success = MAYBE;
+       XtGetSelectionValue(myShell, cbd->sel_atom, type,
+           clip_x11_request_selection_cb, (XtPointer)&success, CurrentTime);
+  
+***************
+*** 2145,2169 ****
+        * paste!  Don't worry, we will catch up with any other events later.
+        */
+       start_time = time(NULL);
+!      for (;;)
+       {
+!          if (XCheckTypedEvent(dpy, SelectionNotify, &event))
+           {
+!              /* this is where clip_x11_request_selection_cb() is actually
+!               * called */
+               XtDispatchEvent(&event);
+!              break;
+           }
+-          if (XCheckTypedEvent(dpy, SelectionRequest, &event))
+-              /* We may get a SelectionRequest here and if we don't handle
+-               * it we hang.  KDE klipper does this, for example. */
+-              XtDispatchEvent(&event);
+  
+           /* Time out after 2 to 3 seconds to avoid that we hang when the
+            * other process doesn't respond.  Note that the SelectionNotify
+            * event may still come later when the selection owner comes back
+!           * to life and the text gets inserted unexpectedly (by xterm).
+!           * Don't know how to avoid that :-(. */
+           if (time(NULL) > start_time + 2)
+           {
+               timed_out = TRUE;
+--- 2145,2171 ----
+        * paste!  Don't worry, we will catch up with any other events later.
+        */
+       start_time = time(NULL);
+!      while (success == MAYBE)
+       {
+!          if (XCheckTypedEvent(dpy, SelectionNotify, &event)
+!                  || XCheckTypedEvent(dpy, SelectionRequest, &event)
+!                  || XCheckTypedEvent(dpy, PropertyNotify, &event))
+           {
+!              /* This is where clip_x11_request_selection_cb() should be
+!               * called.  It may actually happen a bit later, so we loop
+!               * until "success" changes.
+!               * We may get a SelectionRequest here and if we don't handle
+!               * it we hang.  KDE klipper does this, for example.
+!               * We need to handle a PropertyNotify for large selections. */
+               XtDispatchEvent(&event);
+!              continue;
+           }
+  
+           /* Time out after 2 to 3 seconds to avoid that we hang when the
+            * other process doesn't respond.  Note that the SelectionNotify
+            * event may still come later when the selection owner comes back
+!           * to life and the text gets inserted unexpectedly.  Don't know
+!           * why that happens or how to avoid that :-(. */
+           if (time(NULL) > start_time + 2)
+           {
+               timed_out = TRUE;
+***************
+*** 2177,2183 ****
+           ui_delay(1L, TRUE);
+       }
+  
+!      if (success)
+           return;
+  
+       /* don't do a retry with another type after timing out, otherwise we
+--- 2179,2185 ----
+           ui_delay(1L, TRUE);
+       }
+  
+!      if (success == TRUE)
+           return;
+  
+       /* don't do a retry with another type after timing out, otherwise we
+*** ../vim-7.2.016/src/version.c       Sun Sep 14 14:41:44 2008
+--- src/version.c      Sun Sep 14 15:55:34 2008
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     17,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+54. You start tilting your head sideways to smile. :-)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
diff --git a/7.2.018 b/7.2.018
new file mode 100644 (file)
index 0000000..b195f09
--- /dev/null
+++ b/7.2.018
@@ -0,0 +1,45 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.018
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.018
+Problem:    Memory leak when substitute is aborted.
+Solution:   Free the buffer allocated for the new text. (Dominique Pelle)
+Files:     src/ex_cmds.c
+
+
+*** ../vim-7.2.017/src/ex_cmds.c       Wed Aug  6 15:03:07 2008
+--- src/ex_cmds.c      Sun Sep 14 13:45:03 2008
+***************
+*** 5059,5064 ****
+--- 5059,5065 ----
+  
+           if (did_sub)
+               ++sub_nlines;
++          vim_free(new_start);        /* for when substitute was cancelled */
+           vim_free(sub_firstline);    /* free the copy of the original line */
+           sub_firstline = NULL;
+       }
+*** ../vim-7.2.017/src/version.c       Sun Sep 14 15:57:54 2008
+--- src/version.c      Sun Sep 14 21:38:25 2008
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     18,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+55. You ask your doctor to implant a gig in your brain.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.367483 seconds and 4 git commands to generate.