Author: glen                         Date: Fri Dec 22 20:02:17 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- vim 7.0 official patches

---- Files affected:
SOURCES:
   7.0.159 (NONE -> 1.1)  (NEW), 7.0.160 (NONE -> 1.1)  (NEW), 7.0.162 (NONE -> 
1.1)  (NEW), 7.0.163 (NONE -> 1.1)  (NEW), 7.0.164 (NONE -> 1.1)  (NEW), 
7.0.165 (NONE -> 1.1)  (NEW), 7.0.166 (NONE -> 1.1)  (NEW), 7.0.167 (NONE -> 
1.1)  (NEW), 7.0.168 (NONE -> 1.1)  (NEW), 7.0.169 (NONE -> 1.1)  (NEW), 
7.0.172 (NONE -> 1.1)  (NEW), 7.0.173 (NONE -> 1.1)  (NEW), 7.0.174 (NONE -> 
1.1)  (NEW), 7.0.175 (NONE -> 1.1)  (NEW), 7.0.176 (NONE -> 1.1)  (NEW), 
7.0.177 (NONE -> 1.1)  (NEW), 7.0.178 (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/7.0.159
diff -u /dev/null SOURCES/7.0.159:1.1
--- /dev/null   Fri Dec 22 21:02:17 2006
+++ SOURCES/7.0.159     Fri Dec 22 21:02:12 2006
@@ -0,0 +1,80 @@
+To: [email protected]
+Subject: Patch 7.0.159
+Fcc: outbox
+From: Bram Moolenaar <[EMAIL PROTECTED]>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.159
+Problem:    When there is an I/O error in the swap file the cause of the error
+           cannot be seen.
+Solution:   Use PERROR() instead of EMSG() where possible.
+Files:     src/memfile.c
+
+
+*** ../vim-7.0.158/src/memfile.c       Wed Nov  1 18:10:36 2006
+--- src/memfile.c      Wed Nov  1 21:38:59 2006
+***************
+*** 1028,1039 ****
+      size = page_size * hp->bh_page_count;
+      if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
+      {
+!      EMSG(_("E294: Seek error in swap file read"));
+       return FAIL;
+      }
+      if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size)
+      {
+!      EMSG(_("E295: Read error in swap file"));
+       return FAIL;
+      }
+      return OK;
+--- 1028,1039 ----
+      size = page_size * hp->bh_page_count;
+      if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
+      {
+!      PERROR(_("E294: Seek error in swap file read"));
+       return FAIL;
+      }
+      if ((unsigned)vim_read(mfp->mf_fd, hp->bh_data, size) != size)
+      {
+!      PERROR(_("E295: Read error in swap file"));
+       return FAIL;
+      }
+      return OK;
+***************
+*** 1085,1091 ****
+       offset = (off_t)page_size * nr;
+       if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
+       {
+!          EMSG(_("E296: Seek error in swap file write"));
+           return FAIL;
+       }
+       if (hp2 == NULL)            /* freed block, fill with dummy data */
+--- 1085,1091 ----
+       offset = (off_t)page_size * nr;
+       if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset)
+       {
+!          PERROR(_("E296: Seek error in swap file write"));
+           return FAIL;
+       }
+       if (hp2 == NULL)            /* freed block, fill with dummy data */
+*** ../vim-7.0.158/src/version.c       Wed Nov  1 21:24:58 2006
+--- src/version.c      Tue Nov  7 17:58:58 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     159,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+171. You invent another person and chat with yourself in empty chat rooms.
+
+ /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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    ///

================================================================
Index: SOURCES/7.0.160
diff -u /dev/null SOURCES/7.0.160:1.1
--- /dev/null   Fri Dec 22 21:02:17 2006
+++ SOURCES/7.0.160     Fri Dec 22 21:02:12 2006
@@ -0,0 +1,309 @@
+To: [email protected]
+Subject: Patch 7.0.160
+Fcc: outbox
+From: Bram Moolenaar <[EMAIL PROTECTED]>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.160
+Problem:    ":@a" echoes the command, Vi doesn't do that.
+Solution:   Set the silent flag in the typeahead buffer to avoid echoing the
+            command.
+Files:      src/ex_docmd.c, src/normal.c, src/ops.c, src/proto/ops.pro
+
+
+*** ../vim-7.0.159/src/ex_docmd.c      Tue Oct 24 13:02:27 2006
+--- src/ex_docmd.c     Tue Nov  7 17:42:52 2006
+***************
+*** 8219,8226 ****
+      c = *eap->arg;
+      if (c == NUL || (c == '*' && *eap->cmd == '*'))
+       c = '@';
+!     /* put the register in mapbuf */
+!     if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL) == FAIL)
+      {
+       beep_flush();
+      }
+--- 8219,8227 ----
+      c = *eap->arg;
+      if (c == NUL || (c == '*' && *eap->cmd == '*'))
+       c = '@';
+!     /* Put the register in the typeahead buffer with the "silent" flag. */
+!     if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL, TRUE)
+!                                                                    == FAIL)
+      {
+       beep_flush();
+      }
+*** ../vim-7.0.159/src/normal.c        Tue Oct 17 22:40:14 2006
+--- src/normal.c       Tue Nov  7 17:42:59 2006
+***************
+*** 8860,8866 ****
+  #endif
+      while (cap->count1-- && !got_int)
+      {
+!      if (do_execreg(cap->nchar, FALSE, FALSE) == FAIL)
+       {
+           clearopbeep(cap->oap);
+           break;
+--- 8860,8866 ----
+  #endif
+      while (cap->count1-- && !got_int)
+      {
+!      if (do_execreg(cap->nchar, FALSE, FALSE, FALSE) == FAIL)
+       {
+           clearopbeep(cap->oap);
+           break;
+*** ../vim-7.0.159/src/ops.c   Tue Oct 17 16:26:52 2006
+--- src/ops.c  Tue Nov  7 17:52:30 2006
+***************
+*** 95,102 ****
+  static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, 
struct block_def*bdp));
+  #endif
+  static int   stuff_yank __ARGS((int, char_u *));
+! static void  put_reedit_in_typebuf __ARGS((void));
+! static int   put_in_typebuf __ARGS((char_u *s, int colon));
+  static void  stuffescaped __ARGS((char_u *arg, int literally));
+  #ifdef FEAT_MBYTE
+  static void  mb_adjust_opend __ARGS((oparg_T *oap));
+--- 95,102 ----
+  static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, 
struct block_def*bdp));
+  #endif
+  static int   stuff_yank __ARGS((int, char_u *));
+! static void  put_reedit_in_typebuf __ARGS((int silent));
+! static int   put_in_typebuf __ARGS((char_u *s, int colon, int silent));
+  static void  stuffescaped __ARGS((char_u *arg, int literally));
+  #ifdef FEAT_MBYTE
+  static void  mb_adjust_opend __ARGS((oparg_T *oap));
+***************
+*** 1120,1129 ****
+   * return FAIL for failure, OK otherwise
+   */
+      int
+! do_execreg(regname, colon, addcr)
+      int          regname;
+      int          colon;              /* insert ':' before each line */
+      int          addcr;              /* always add '\n' to end of line */
+  {
+      static int       lastc = NUL;
+      long     i;
+--- 1120,1130 ----
+   * return FAIL for failure, OK otherwise
+   */
+      int
+! do_execreg(regname, colon, addcr, silent)
+      int          regname;
+      int          colon;              /* insert ':' before each line */
+      int          addcr;              /* always add '\n' to end of line */
++     int          silent;             /* set "silent" flag in typeahead 
buffer */
+  {
+      static int       lastc = NUL;
+      long     i;
+***************
+*** 1173,1181 ****
+           /* When in Visual mode "'<,'>" will be prepended to the command.
+            * Remove it when it's already there. */
+           if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
+!              retval = put_in_typebuf(p + 5, TRUE);
+           else
+!              retval = put_in_typebuf(p, TRUE);
+       }
+       vim_free(p);
+      }
+--- 1174,1182 ----
+           /* When in Visual mode "'<,'>" will be prepended to the command.
+            * Remove it when it's already there. */
+           if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
+!              retval = put_in_typebuf(p + 5, TRUE, silent);
+           else
+!              retval = put_in_typebuf(p, TRUE, silent);
+       }
+       vim_free(p);
+      }
+***************
+*** 1186,1192 ****
+       p = get_expr_line();
+       if (p == NULL)
+           return FAIL;
+!      retval = put_in_typebuf(p, colon);
+       vim_free(p);
+      }
+  #endif
+--- 1187,1193 ----
+       p = get_expr_line();
+       if (p == NULL)
+           return FAIL;
+!      retval = put_in_typebuf(p, colon, silent);
+       vim_free(p);
+      }
+  #endif
+***************
+*** 1198,1204 ****
+           EMSG(_(e_noinstext));
+           return FAIL;
+       }
+!      retval = put_in_typebuf(p, colon);
+       vim_free(p);
+      }
+      else
+--- 1199,1205 ----
+           EMSG(_(e_noinstext));
+           return FAIL;
+       }
+!      retval = put_in_typebuf(p, colon, silent);
+       vim_free(p);
+      }
+      else
+***************
+*** 1213,1232 ****
+       /*
+        * Insert lines into typeahead buffer, from last one to first one.
+        */
+!      put_reedit_in_typebuf();
+       for (i = y_current->y_size; --i >= 0; )
+       {
+           /* insert NL between lines and after last line if type is MLINE */
+           if (y_current->y_type == MLINE || i < y_current->y_size - 1
+                                                                    || addcr)
+           {
+!              if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, FALSE) == FAIL)
+                   return FAIL;
+           }
+!          if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, FALSE)
+                                                                     == FAIL)
+               return FAIL;
+!          if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, FALSE)
+                                                                     == FAIL)
+               return FAIL;
+       }
+--- 1214,1233 ----
+       /*
+        * Insert lines into typeahead buffer, from last one to first one.
+        */
+!      put_reedit_in_typebuf(silent);
+       for (i = y_current->y_size; --i >= 0; )
+       {
+           /* insert NL between lines and after last line if type is MLINE */
+           if (y_current->y_type == MLINE || i < y_current->y_size - 1
+                                                                    || addcr)
+           {
+!              if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL)
+                   return FAIL;
+           }
+!          if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, silent)
+                                                                     == FAIL)
+               return FAIL;
+!          if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
+                                                                     == FAIL)
+               return FAIL;
+       }
+***************
+*** 1240,1246 ****
+   * used only after other typeahead has been processed.
+   */
+      static void
+! put_reedit_in_typebuf()
+  {
+      char_u   buf[3];
+  
+--- 1241,1248 ----
+   * used only after other typeahead has been processed.
+   */
+      static void
+! put_reedit_in_typebuf(silent)
+!     int              silent;
+  {
+      char_u   buf[3];
+  
+***************
+*** 1257,1281 ****
+           buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
+           buf[1] = NUL;
+       }
+!      if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, FALSE) == OK)
+           restart_edit = NUL;
+      }
+  }
+  
+      static int
+! put_in_typebuf(s, colon)
+      char_u   *s;
+      int              colon;      /* add ':' before the line */
+  {
+      int              retval = OK;
+  
+!     put_reedit_in_typebuf();
+      if (colon)
+!      retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, FALSE);
+      if (retval == OK)
+!      retval = ins_typebuf(s, REMAP_YES, 0, TRUE, FALSE);
+      if (colon && retval == OK)
+!      retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, FALSE);
+      return retval;
+  }
+  
+--- 1259,1284 ----
+           buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
+           buf[1] = NUL;
+       }
+!      if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, silent) == OK)
+           restart_edit = NUL;
+      }
+  }
+  
+      static int
+! put_in_typebuf(s, colon, silent)
+      char_u   *s;
+      int              colon;      /* add ':' before the line */
++     int              silent;
+  {
+      int              retval = OK;
+  
+!     put_reedit_in_typebuf(silent);
+      if (colon)
+!      retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
+      if (retval == OK)
+!      retval = ins_typebuf(s, REMAP_YES, 0, TRUE, silent);
+      if (colon && retval == OK)
+!      retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
+      return retval;
+  }
+  
+*** ../vim-7.0.159/src/proto/ops.pro   Tue Oct 17 16:26:52 2006
+--- src/proto/ops.pro  Tue Nov  7 18:08:35 2006
+***************
+*** 17,23 ****
+  extern void put_register __ARGS((int name, void *reg));
+  extern int yank_register_mline __ARGS((int regname));
+  extern int do_record __ARGS((int c));
+! extern int do_execreg __ARGS((int regname, int colon, int addcr));
+  extern int insert_reg __ARGS((int regname, int literally));
+  extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, 
int errmsg));
+  extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr));
+--- 17,23 ----
+  extern void put_register __ARGS((int name, void *reg));
+  extern int yank_register_mline __ARGS((int regname));
+  extern int do_record __ARGS((int c));
+! extern int do_execreg __ARGS((int regname, int colon, int addcr, int 
silent));
+  extern int insert_reg __ARGS((int regname, int literally));
+  extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, 
int errmsg));
+  extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr));
+*** ../vim-7.0.159/src/version.c       Tue Nov  7 18:02:19 2006
+--- src/version.c      Tue Nov  7 18:05:36 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
++     160,
+  /**/
+
+-- 
+hundred-and-one symptoms of being an internet addict:
+172. You join listservers just for the extra e-mail.
+
+ /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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    ///

================================================================
Index: SOURCES/7.0.162
diff -u /dev/null SOURCES/7.0.162:1.1
--- /dev/null   Fri Dec 22 21:02:17 2006
+++ SOURCES/7.0.162     Fri Dec 22 21:02:12 2006
@@ -0,0 +1,200 @@
+To: [email protected]
+Subject: Patch 7.0.162
+Fcc: outbox
+From: Bram Moolenaar <[EMAIL PROTECTED]>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.0.162
+Problem:    "vim -o a b" when file "a" triggers the ATTENTION dialog,
+           selecting "Quit" exits Vim instead of editing "b" only.
+           When file "b" triggers the ATTENTION dialog selecting "Quit" or
+           "Abort" results in editing file "a" in that window.
+Solution:   When selecting "Abort" exit Vim.  When selecting "Quit" close the
+           window.  Also avoid hit-enter prompt when selecting Abort.
+Files:     src/buffer.c, src/main.c
+
+
+*** ../vim-7.0.161/src/buffer.c        Fri Oct 20 20:15:05 2006
+--- src/buffer.c       Tue Nov  7 21:08:02 2006
+***************
+*** 4220,4226 ****
+  
+      /* Use the name from the associated buffer if it exists. */
+      bp = buflist_findnr(aep->ae_fnum);
+!     if (bp == NULL)
+       return aep->ae_fname;
+      return bp->b_fname;
+  }
+--- 4222,4228 ----
+  
+      /* Use the name from the associated buffer if it exists. */
+      bp = buflist_findnr(aep->ae_fnum);
+!     if (bp == NULL || bp->b_fname == NULL)
+       return aep->ae_fname;
+      return bp->b_fname;
+  }
+*** ../vim-7.0.161/src/main.c  Tue Sep  5 12:57:14 2006
+--- src/main.c Tue Nov  7 22:35:49 2006
+***************
+*** 2392,2398 ****
+               (void)open_buffer(FALSE, NULL); /* create memfile, read file */
+  
+  #if defined(HAS_SWAP_EXISTS_ACTION)
+!              check_swap_exists_action();
+  #endif
+  #ifdef FEAT_AUTOCMD
+               dorewind = TRUE;                /* start again */
+--- 2392,2414 ----
+               (void)open_buffer(FALSE, NULL); /* create memfile, read file */
+  
+  #if defined(HAS_SWAP_EXISTS_ACTION)
+!              if (swap_exists_action == SEA_QUIT)
+!              {
+!                  if (got_int || only_one_window())
+!                  {
+!                      /* abort selected or quit and only one window */
+!                      did_emsg = FALSE;   /* avoid hit-enter prompt */
+!                      getout(1);
+!                  }
+!                  /* We can't close the window, it would disturb what
+!                   * happens next.  Clear the file name and set the arg
+!                   * index to -1 to delete it later. */
+!                  setfname(curbuf, NULL, NULL, FALSE);
+!                  curwin->w_arg_idx = -1;
+!                  swap_exists_action = SEA_NONE;
+!              }
+!              else
+!                  handle_swap_exists(NULL);
+  #endif
+  #ifdef FEAT_AUTOCMD
+               dorewind = TRUE;                /* start again */
+***************
+*** 2432,2437 ****
+--- 2448,2455 ----
+  {
+      int              arg_idx;                /* index in argument list */
+      int              i;
++     int              advance = TRUE;
++     buf_T    *old_curbuf;
+  
+  # ifdef FEAT_AUTOCMD
+      /*
+***************
+*** 2440,2470 ****
+      ++autocmd_no_enter;
+      ++autocmd_no_leave;
+  # endif
+      arg_idx = 1;
+      for (i = 1; i < parmp->window_count; ++i)
+      {
+!      if (parmp->window_layout == WIN_TABS)
+       {
+!          if (curtab->tp_next == NULL)        /* just checking */
+!              break;
+!          goto_tabpage(0);
+       }
+!      else
+       {
+!          if (curwin->w_next == NULL)         /* just checking */
+!              break;
+!          win_enter(curwin->w_next, FALSE);
+       }
+  
+       /* Only open the file if there is no file in this window yet (that can
+!       * happen when .vimrc contains ":sall") */
+       if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL)
+       {
+           curwin->w_arg_idx = arg_idx;
+!          /* edit file from arg list, if there is one */
+           (void)do_ecmd(0, arg_idx < GARGCOUNT
+                         ? alist_name(&GARGLIST[arg_idx]) : NULL,
+                         NULL, NULL, ECMD_LASTL, ECMD_HIDE);
+           if (arg_idx == GARGCOUNT - 1)
+               arg_had_last = TRUE;
+           ++arg_idx;
+--- 2458,2522 ----
+      ++autocmd_no_enter;
+      ++autocmd_no_leave;
+  # endif
++ 
++     /* When w_arg_idx is -1 remove the window (see create_windows()). */
++     if (curwin->w_arg_idx == -1)
++     {
++      win_close(curwin, TRUE);
++      advance = FALSE;
++     }
++ 
+      arg_idx = 1;
+      for (i = 1; i < parmp->window_count; ++i)
+      {
+!      /* When w_arg_idx is -1 remove the window (see create_windows()). */
+!      if (curwin->w_arg_idx == -1)
+       {
+!          ++arg_idx;
+!          win_close(curwin, TRUE);
+!          advance = FALSE;
+!          continue;
+       }
+! 
+!      if (advance)
+       {
+!          if (parmp->window_layout == WIN_TABS)
+!          {
+!              if (curtab->tp_next == NULL)    /* just checking */
+!                  break;
+!              goto_tabpage(0);
+!          }
+!          else
+!          {
+!              if (curwin->w_next == NULL)     /* just checking */
+!                  break;
+!              win_enter(curwin->w_next, FALSE);
+!          }
+       }
++      advance = TRUE;
+  
+       /* Only open the file if there is no file in this window yet (that can
+!       * happen when .vimrc contains ":sall"). */
+       if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL)
+       {
+           curwin->w_arg_idx = arg_idx;
+!          /* Edit file from arg list, if there is one.  When "Quit" selected
+!           * at the ATTENTION prompt close the window. */
+!          old_curbuf = curbuf;
+           (void)do_ecmd(0, arg_idx < GARGCOUNT
+                         ? alist_name(&GARGLIST[arg_idx]) : NULL,
+                         NULL, NULL, ECMD_LASTL, ECMD_HIDE);
++          if (curbuf == old_curbuf)
++          {
++              if (got_int || only_one_window())
++              {
++                  /* abort selected or quit and only one window */
++                  did_emsg = FALSE;   /* avoid hit-enter prompt */
++                  getout(1);
++              }
++              win_close(curwin, TRUE);
++              advance = FALSE;
++          }
+           if (arg_idx == GARGCOUNT - 1)
+               arg_had_last = TRUE;
+           ++arg_idx;
+*** ../vim-7.0.161/src/version.c       Tue Nov  7 19:05:36 2006
+--- src/version.c      Tue Nov  7 21:21:28 2006
+***************
+*** 668,669 ****
+--- 668,671 ----
+  {   /* Add new patch number below this line */
++ /**/
<<Diff was trimmed, longer than 597 lines>>
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to