--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.064
+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.1.064
+Problem: On Interix some files appear not to exist.
+Solution: Remove the top bit from st_mode. (Ligesh)
+Files: src/os_unix.c
+
+
+*** ../vim-7.1.063/src/os_unix.c Thu May 10 19:42:47 2007
+--- src/os_unix.c Fri Aug 10 19:32:20 2007
+***************
+*** 2499,2505 ****
+--- 2499,2511 ----
+ if (stat((char *)name, &statb))
+ #endif
+ return -1;
++ #ifdef __INTERIX
++ /* The top bit makes the value negative, which means the file doesn't
++ * exist. Remove the bit, we don't use it. */
++ return statb.st_mode & ~S_ADDACE;
++ #else
+ return statb.st_mode;
++ #endif
+ }
+
+ /*
+*** ../vim-7.1.063/src/version.c Sat Aug 11 15:59:44 2007
+--- src/version.c Sat Aug 11 22:21:35 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 64,
+ /**/
+
+--
+I have a watch cat! Just break in and she'll watch.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.065 (extra)
+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.1.065 (extra)
+Problem: Win32: Compilation problem for newer version of w32api.
+Solution: Only define __IID_DEFINED__ when needed. (Chris Sutcliffe)
+Files: src/Make_ming.mak, src/iid_ole.c
+
+
+*** ../vim-7.1.064/src/Make_ming.mak Thu May 10 19:35:54 2007
+--- src/Make_ming.mak Sat Aug 11 14:52:11 2007
+***************
+*** 572,579 ****
+ $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
+ $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+
+ $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
+! $(CC) $(CFLAGS) -D__IID_DEFINED__ -c -o $(OUTDIR)/if_ole.o if_ole.cpp
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+ ifeq (16, $(RUBY))
+--- 572,580 ----
+ $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
+ $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
+
++ # Remove -D__IID_DEFINED__ for newer versions of the w32api
+ $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
+! $(CC) $(CFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
+
+ $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
+ ifeq (16, $(RUBY))
+*** ../vim-7.1.064/src/iid_ole.c Sun Jun 13 18:45:30 2004
+--- src/iid_ole.c Sat Aug 11 14:57:58 2007
+***************
+*** 16,24 ****
+ extern "C"{
+ #endif
+
+
+ #ifndef __IID_DEFINED__
+! #define __IID_DEFINED__
+
+ typedef struct _IID
+ {
+--- 16,33 ----
+ extern "C"{
+ #endif
+
++ #ifdef __MINGW32__
++ # include <w32api.h>
++
++ # if __W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 10
++ /* This define is missing from older MingW versions of w32api, even though
++ * IID is defined. */
++ # define __IID_DEFINED__
++ # endif
++ #endif
+
+ #ifndef __IID_DEFINED__
+! # define __IID_DEFINED__
+
+ typedef struct _IID
+ {
+***************
+*** 28,39 ****
+ unsigned char c[8];
+ } IID;
+
+! #endif // __IID_DEFINED__
+
+ #ifndef CLSID_DEFINED
+! #define CLSID_DEFINED
+ typedef IID CLSID;
+! #endif // CLSID_DEFINED
+
+ const IID IID_IVim = {0x0F0BFAE2,0x4C90,0x11d1,{0x82,0xD7,0x00,0x04,0xAC,0x36,0x85,0x19}};
+
+--- 37,48 ----
+ unsigned char c[8];
+ } IID;
+
+! #endif
+
+ #ifndef CLSID_DEFINED
+! # define CLSID_DEFINED
+ typedef IID CLSID;
+! #endif
+
+ const IID IID_IVim = {0x0F0BFAE2,0x4C90,0x11d1,{0x82,0xD7,0x00,0x04,0xAC,0x36,0x85,0x19}};
+
+*** ../vim-7.1.064/src/version.c Sat Aug 11 22:22:56 2007
+--- src/version.c Sun Aug 12 15:21:34 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 65,
+ /**/
+
+--
+I'm writing a book. I've got the page numbers done.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.066
+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.1.066
+Problem: When 'bomb' is set or reset the file should be considered
+ modified. (Tony Mechelynck)
+Solution: Handle like 'endofline'. (Martin Toft)
+Files: src/buffer.c, src/fileio.c, src/option.c, src/structs.h
+
+
+*** ../vim-7.1.065/src/buffer.c Mon Aug 6 22:27:12 2007
+--- src/buffer.c Sat Aug 11 16:56:57 2007
+***************
+*** 502,507 ****
+--- 502,508 ----
+ buf->b_start_eol = TRUE;
+ #ifdef FEAT_MBYTE
+ buf->b_p_bomb = FALSE;
++ buf->b_start_bomb = FALSE;
+ #endif
+ buf->b_ml.ml_mfp = NULL;
+ buf->b_ml.ml_flags = ML_EMPTY; /* empty buffer */
+*** ../vim-7.1.065/src/fileio.c Tue Jul 10 17:09:51 2007
+--- src/fileio.c Sat Aug 11 16:56:57 2007
+***************
+*** 654,659 ****
+--- 654,660 ----
+ curbuf->b_start_eol = TRUE;
+ #ifdef FEAT_MBYTE
+ curbuf->b_p_bomb = FALSE;
++ curbuf->b_start_bomb = FALSE;
+ #endif
+ }
+
+***************
+*** 912,918 ****
+--- 913,922 ----
+ file_rewind = FALSE;
+ #ifdef FEAT_MBYTE
+ if (set_options)
++ {
+ curbuf->b_p_bomb = FALSE;
++ curbuf->b_start_bomb = FALSE;
++ }
+ conv_error = 0;
+ #endif
+ }
+***************
+*** 1361,1367 ****
+--- 1365,1374 ----
+ size -= blen;
+ mch_memmove(ptr, ptr + blen, (size_t)size);
+ if (set_options)
++ {
+ curbuf->b_p_bomb = TRUE;
++ curbuf->b_start_bomb = TRUE;
++ }
+ }
+
+ if (fio_flags == FIO_UCSBOM)
+*** ../vim-7.1.065/src/option.c Tue Jul 24 14:57:16 2007
+--- src/option.c Sat Aug 11 16:56:57 2007
+***************
+*** 7118,7123 ****
+--- 7118,7128 ----
+ /* when 'endofline' is changed, redraw the window title */
+ else if ((int *)varp == &curbuf->b_p_eol)
+ need_maketitle = TRUE;
++ #ifdef FEAT_MBYTE
++ /* when 'bomb' is changed, redraw the window title */
++ else if ((int *)varp == &curbuf->b_p_bomb)
++ need_maketitle = TRUE;
++ #endif
+ #endif
+
+ /* when 'bin' is set also set some other options */
+***************
+*** 10604,10609 ****
+--- 10609,10616 ----
+ buf->b_start_ffc = *buf->b_p_ff;
+ buf->b_start_eol = buf->b_p_eol;
+ #ifdef FEAT_MBYTE
++ buf->b_start_bomb = buf->b_p_bomb;
++
+ /* Only use free/alloc when necessary, they take time. */
+ if (buf->b_start_fenc == NULL
+ || STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0)
+***************
+*** 10617,10623 ****
+ /*
+ * Return TRUE if 'fileformat' and/or 'fileencoding' has a different value
+ * from when editing started (save_file_ff() called).
+! * Also when 'endofline' was changed and 'binary' is set.
+ * Don't consider a new, empty buffer to be changed.
+ */
+ int
+--- 10624,10631 ----
+ /*
+ * Return TRUE if 'fileformat' and/or 'fileencoding' has a different value
+ * from when editing started (save_file_ff() called).
+! * Also when 'endofline' was changed and 'binary' is set, or when 'bomb' was
+! * changed and 'binary' is not set.
+ * Don't consider a new, empty buffer to be changed.
+ */
+ int
+***************
+*** 10636,10641 ****
+--- 10644,10651 ----
+ if (buf->b_p_bin && buf->b_start_eol != buf->b_p_eol)
+ return TRUE;
+ #ifdef FEAT_MBYTE
++ if (!buf->b_p_bin && buf->b_start_bomb != buf->b_p_bomb)
++ return TRUE;
+ if (buf->b_start_fenc == NULL)
+ return (*buf->b_p_fenc != NUL);
+ return (STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0);
+*** ../vim-7.1.065/src/structs.h Thu Jul 26 22:55:11 2007
+--- src/structs.h Sat Aug 11 16:56:57 2007
+***************
+*** 1453,1458 ****
+--- 1453,1459 ----
+ #ifdef FEAT_MBYTE
+ char_u *b_start_fenc; /* 'fileencoding' when edit started or NULL */
+ int b_bad_char; /* "++bad=" argument when edit started or 0 */
++ int b_start_bomb; /* 'bomb' when it was read */
+ #endif
+
+ #ifdef FEAT_EVAL
+*** ../vim-7.1.065/src/version.c Sun Aug 12 15:24:05 2007
+--- src/version.c Sun Aug 12 15:48:34 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 66,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+127. You bring your laptop and cellular phone to church.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.067
+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.1.067
+Problem: 'thesaurus' doesn't work when 'infercase' is set. (Mohsin)
+Solution: Don't copy the characters being completed but check the case and
+ apply it to the suggested word. Also fix that the first word in
+ the thesaurus line is not used. (Martin Toft)
+Files: src/edit.c
+
+
+*** ../vim-7.1.066/src/edit.c Sun Jul 29 15:02:34 2007
+--- src/edit.c Sat Aug 11 17:16:51 2007
+***************
+*** 2057,2063 ****
+ * case of the originally typed text is used, and the case of the completed
+ * text is inferred, ie this tries to work out what case you probably wanted
+ * the rest of the word to be in -- webb
+- * TODO: make this work for multi-byte characters.
+ */
+ int
+ ins_compl_add_infercase(str, len, icase, fname, dir, flags)
+--- 2057,2062 ----
+***************
+*** 2068,2121 ****
+ int dir;
+ int flags;
+ {
+ int has_lower = FALSE;
+ int was_letter = FALSE;
+- int idx;
+
+! if (p_ic && curbuf->b_p_inf && len < IOSIZE)
+ {
+! /* Infer case of completed part -- webb */
+! /* Use IObuff, str would change text in buffer! */
+! vim_strncpy(IObuff, str, len);
+
+! /* Rule 1: Were any chars converted to lower? */
+! for (idx = 0; idx < compl_length; ++idx)
+ {
+! if (islower(compl_orig_text[idx]))
+ {
+! has_lower = TRUE;
+! if (isupper(IObuff[idx]))
+! {
+! /* Rule 1 is satisfied */
+! for (idx = compl_length; idx < len; ++idx)
+! IObuff[idx] = TOLOWER_LOC(IObuff[idx]);
+! break;
+! }
+ }
+ }
+
+! /*
+! * Rule 2: No lower case, 2nd consecutive letter converted to
+! * upper case.
+! */
+! if (!has_lower)
+ {
+! for (idx = 0; idx < compl_length; ++idx)
+ {
+! if (was_letter && isupper(compl_orig_text[idx])
+! && islower(IObuff[idx]))
+ {
+! /* Rule 2 is satisfied */
+! for (idx = compl_length; idx < len; ++idx)
+! IObuff[idx] = TOUPPER_LOC(IObuff[idx]);
+! break;
+ }
+- was_letter = isalpha(compl_orig_text[idx]);
+ }
+- }
+
+! /* Copy the original case of the part we typed */
+! STRNCPY(IObuff, compl_orig_text, compl_length);
+
+ return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
+ flags, FALSE);
+--- 2067,2213 ----
+ int dir;
+ int flags;
+ {
++ char_u *p;
++ int i, c;
++ int actual_len; /* Take multi-byte characters */
++ int actual_compl_length; /* into account. */
++ int *wca; /* Wide character array. */
+ int has_lower = FALSE;
+ int was_letter = FALSE;
+
+! if (p_ic && curbuf->b_p_inf)
+ {
+! /* Infer case of completed part. */
+
+! /* Find actual length of completion. */
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+ {
+! p = str;
+! actual_len = 0;
+! while (*p != NUL)
+ {
+! mb_ptr_adv(p);
+! ++actual_len;
+ }
+ }
++ else
++ #endif
++ actual_len = len;
+
+! /* Find actual length of original text. */
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+ {
+! p = compl_orig_text;
+! actual_compl_length = 0;
+! while (*p != NUL)
+ {
+! mb_ptr_adv(p);
+! ++actual_compl_length;
+! }
+! }
+! else
+! #endif
+! actual_compl_length = compl_length;
+!
+! /* Allocate wide character array for the completion and fill it. */
+! wca = (int *)alloc(actual_len * sizeof(int));
+! if (wca != NULL)
+! {
+! p = str;
+! for (i = 0; i < actual_len; ++i)
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! wca[i] = mb_ptr2char_adv(&p);
+! else
+! #endif
+! wca[i] = *(p++);
+!
+! /* Rule 1: Were any chars converted to lower? */
+! p = compl_orig_text;
+! for (i = 0; i < actual_compl_length; ++i)
+! {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! c = mb_ptr2char_adv(&p);
+! else
+! #endif
+! c = *(p++);
+! if (MB_ISLOWER(c))
+ {
+! has_lower = TRUE;
+! if (MB_ISUPPER(wca[i]))
+! {
+! /* Rule 1 is satisfied. */
+! for (i = actual_compl_length; i < actual_len; ++i)
+! wca[i] = MB_TOLOWER(wca[i]);
+! break;
+! }
+ }
+ }
+
+! /*
+! * Rule 2: No lower case, 2nd consecutive letter converted to
+! * upper case.
+! */
+! if (!has_lower)
+! {
+! p = compl_orig_text;
+! for (i = 0; i < actual_compl_length; ++i)
+! {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! c = mb_ptr2char_adv(&p);
+! else
+! #endif
+! c = *(p++);
+! if (was_letter && MB_ISUPPER(c) && MB_ISLOWER(wca[i]))
+! {
+! /* Rule 2 is satisfied. */
+! for (i = actual_compl_length; i < actual_len; ++i)
+! wca[i] = MB_TOUPPER(wca[i]);
+! break;
+! }
+! was_letter = MB_ISLOWER(c) || MB_ISUPPER(c);
+! }
+! }
+!
+! /* Copy the original case of the part we typed. */
+! p = compl_orig_text;
+! for (i = 0; i < actual_compl_length; ++i)
+! {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! c = mb_ptr2char_adv(&p);
+! else
+! #endif
+! c = *(p++);
+! if (MB_ISLOWER(c))
+! wca[i] = MB_TOLOWER(wca[i]);
+! else if (MB_ISUPPER(c))
+! wca[i] = MB_TOUPPER(wca[i]);
+! }
+!
+! /*
+! * Generate encoding specific output from wide character array.
+! * Multi-byte characters can occupy up to five bytes more than
+! * ASCII characters, and we also need one byte for NUL, so stay
+! * six bytes away from the edge of IObuff.
+! */
+! p = IObuff;
+! i = 0;
+! while (i < actual_len && (p - IObuff + 6) < IOSIZE)
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! p += mb_char2bytes(wca[i++], p);
+! else
+! #endif
+! *(p++) = wca[i++];
+! *p = NUL;
+!
+! vim_free(wca);
+! }
+
+ return ins_compl_add(IObuff, len, icase, fname, NULL, dir,
+ flags, FALSE);
+***************
+*** 2842,2847 ****
+--- 2934,2940 ----
+ /*
+ * Add the other matches on the line
+ */
++ ptr = buf;
+ while (!got_int)
+ {
+ /* Find start of the next word. Skip white
+***************
+*** 2851,2857 ****
+ break;
+ wstart = ptr;
+
+! /* Find end of the word and add it. */
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* Japanese words may have characters in
+--- 2944,2950 ----
+ break;
+ wstart = ptr;
+
+! /* Find end of the word. */
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+ /* Japanese words may have characters in
+***************
+*** 2868,2876 ****
+ else
+ #endif
+ ptr = find_word_end(ptr);
+! add_r = ins_compl_add_infercase(wstart,
+! (int)(ptr - wstart),
+! p_ic, files[i], *dir, 0);
+ }
+ }
+ if (add_r == OK)
+--- 2961,2972 ----
+ else
+ #endif
+ ptr = find_word_end(ptr);
+!
+! /* Add the word. Skip the regexp match. */
+! if (wstart != regmatch->startp[0])
+! add_r = ins_compl_add_infercase(wstart,
+! (int)(ptr - wstart),
+! p_ic, files[i], *dir, 0);
+ }
+ }
+ if (add_r == OK)
+*** ../vim-7.1.066/src/version.c Sun Aug 12 15:50:26 2007
+--- src/version.c Sun Aug 12 16:36:34 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 67,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+128. You can access the Net -- via your portable and cellular phone.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.068
+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.1.068
+Problem: When 'equalalways' is set and splitting a window, it's possible
+ that another small window gets bigger.
+Solution: Only equalize window sizes when after a split the windows are
+ smaller than another window. (Martin Toft)
+Files: runtime/doc/options.txt, runtime/doc/windows.txt, src/window.c
+
+
+*** ../vim-7.1.067/runtime/doc/options.txt Sat May 12 16:27:04 2007
+--- runtime/doc/options.txt Sat Aug 11 17:25:38 2007
+***************
+*** 1,4 ****
+! *options.txt* For Vim version 7.1. Last change: 2007 May 11
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *options.txt* For Vim version 7.1. Last change: 2007 Aug 10
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 2415,2422 ****
+ When mixing vertically and horizontally split windows, a minimal size
+ is computed and some windows may be larger if there is room. The
+ 'eadirection' option tells in which direction the size is affected.
+! Changing the height of a window can be avoided by setting
+! 'winfixheight'.
+
+ *'equalprg'* *'ep'*
+ 'equalprg' 'ep' string (default "")
+--- 2418,2425 ----
+ When mixing vertically and horizontally split windows, a minimal size
+ is computed and some windows may be larger if there is room. The
+ 'eadirection' option tells in which direction the size is affected.
+! Changing the height and width of a window can be avoided by setting
+! 'winfixheight' and 'winfixwidth', respectively.
+
+ *'equalprg'* *'ep'*
+ 'equalprg' 'ep' string (default "")
+*** ../vim-7.1.067/runtime/doc/windows.txt Sat May 12 16:42:48 2007
+--- runtime/doc/windows.txt Sat Aug 11 17:25:38 2007
+***************
+*** 132,138 ****
+ the same file. Make new window N high (default is to use half
+ the height of the current window). Reduces the current window
+ height to create room (and others, if the 'equalalways' option
+! is set and 'eadirection' isn't "hor").
+ Note: CTRL-S does not work on all terminals and might block
+ further input, use CTRL-Q to get going again.
+ Also see |++opt| and |+cmd|.
+--- 132,139 ----
+ the same file. Make new window N high (default is to use half
+ the height of the current window). Reduces the current window
+ height to create room (and others, if the 'equalalways' option
+! is set, 'eadirection' isn't "hor", and one of them is higher
+! than the current or the new window).
+ Note: CTRL-S does not work on all terminals and might block
+ further input, use CTRL-Q to get going again.
+ Also see |++opt| and |+cmd|.
+***************
+*** 140,148 ****
+ CTRL-W CTRL-V *CTRL-W_CTRL-V*
+ CTRL-W v *CTRL-W_v*
+ :[N]vs[plit] [++opt] [+cmd] [file] *:vs* *:vsplit*
+! Like |:split|, but split vertically. If 'equalalways' is set
+! and 'eadirection' isn't "ver" the windows will be spread out
+! horizontally, unless a width was specified.
+ Note: In other places CTRL-Q does the same as CTRL-V, but here
+ it doesn't!
+
+--- 141,153 ----
+ CTRL-W CTRL-V *CTRL-W_CTRL-V*
+ CTRL-W v *CTRL-W_v*
+ :[N]vs[plit] [++opt] [+cmd] [file] *:vs* *:vsplit*
+! Like |:split|, but split vertically. The windows will be
+! spread out horizontally if
+! 1. a width was not specified,
+! 2. 'equalalways' is set,
+! 3. 'eadirection' isn't "ver", and
+! 4. one of the other windows are wider than the current or new
+! window.
+ Note: In other places CTRL-Q does the same as CTRL-V, but here
+ it doesn't!
+
+*** ../vim-7.1.067/src/window.c Sat Aug 11 13:37:36 2007
+--- src/window.c Sat Aug 11 17:25:38 2007
+***************
+*** 733,739 ****
+ if (flags & WSP_VERT)
+ {
+ layout = FR_ROW;
+- do_equal = (p_ea && new_size == 0 && *p_ead != 'v');
+
+ /*
+ * Check if we are able to split the current window and compute its
+--- 733,738 ----
+***************
+*** 770,785 ****
+ * instead, if possible. */
+ if (oldwin->w_p_wfw)
+ win_setwidth_win(oldwin->w_width + new_size, oldwin);
+ }
+ else
+ #endif
+ {
+ layout = FR_COL;
+- do_equal = (p_ea && new_size == 0
+- #ifdef FEAT_VERTSPLIT
+- && *p_ead != 'h'
+- #endif
+- );
+
+ /*
+ * Check if we are able to split the current window and compute its
+--- 769,799 ----
+ * instead, if possible. */
+ if (oldwin->w_p_wfw)
+ win_setwidth_win(oldwin->w_width + new_size, oldwin);
++
++ /* Only make all windows the same width if one of them (except oldwin)
++ * is wider than one of the split windows. */
++ if (!do_equal && p_ea && size == 0 && *p_ead != 'v'
++ && oldwin->w_frame->fr_parent != NULL)
++ {
++ frp = oldwin->w_frame->fr_parent->fr_child;
++ while (frp != NULL)
++ {
++ if (frp->fr_win != oldwin && frp->fr_win != NULL
++ && (frp->fr_win->w_width > new_size
++ || frp->fr_win->w_width > oldwin->w_width
++ - new_size - STATUS_HEIGHT))
++ {
++ do_equal = TRUE;
++ break;
++ }
++ frp = frp->fr_next;
++ }
++ }
+ }
+ else
+ #endif
+ {
+ layout = FR_COL;
+
+ /*
+ * Check if we are able to split the current window and compute its
+***************
+*** 831,836 ****
+--- 845,873 ----
+ oldwin_height = oldwin->w_height;
+ if (need_status)
+ oldwin_height -= STATUS_HEIGHT;
++ }
++
++ /* Only make all windows the same height if one of them (except oldwin)
++ * is higher than one of the split windows. */
++ if (!do_equal && p_ea && size == 0
++ #ifdef FEAT_VERTSPLIT
++ && *p_ead != 'h'
++ #endif
++ && oldwin->w_frame->fr_parent != NULL)
++ {
++ frp = oldwin->w_frame->fr_parent->fr_child;
++ while (frp != NULL)
++ {
++ if (frp->fr_win != oldwin && frp->fr_win != NULL
++ && (frp->fr_win->w_height > new_size
++ || frp->fr_win->w_height > oldwin_height - new_size
++ - STATUS_HEIGHT))
++ {
++ do_equal = TRUE;
++ break;
++ }
++ frp = frp->fr_next;
++ }
+ }
+ }
+
+*** ../vim-7.1.067/src/version.c Sun Aug 12 16:38:03 2007
+--- src/version.c Sun Aug 12 16:51:36 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 68,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+129. You cancel your newspaper subscription.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.069
+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.1.069
+Problem: GTK GUI: When using confirm() without a default button there still
+ is a default choice.
+Solution: Ignore Enter and Space when there is no default button. (Chris
+ Lubinski)
+Files: src/gui_gtk.c
+
+
+*** ../vim-7.1.068/src/gui_gtk.c Mon May 14 19:35:51 2007
+--- src/gui_gtk.c Sat Aug 11 17:38:03 2007
+***************
+*** 1630,1640 ****
+ */
+ /*ARGSUSED*/
+ static int
+! dlg_key_press_event(GtkWidget * widget, GdkEventKey * event, CancelData *data)
+ {
+! /* Ignore hitting Enter when there is no default button. */
+! if (data->ignore_enter && event->keyval == GDK_Return)
+ return TRUE;
+
+ if (event->keyval != GDK_Escape && event->keyval != GDK_Return)
+ return FALSE;
+--- 1630,1643 ----
+ */
+ /*ARGSUSED*/
+ static int
+! dlg_key_press_event(GtkWidget *widget, GdkEventKey *event, CancelData *data)
+ {
+! /* Ignore hitting Enter (or Space) when there is no default button. */
+! if (data->ignore_enter && (event->keyval == GDK_Return
+! || event->keyval == ' '))
+ return TRUE;
++ else /* A different key was pressed, return to normal behavior */
++ data->ignore_enter = FALSE;
+
+ if (event->keyval != GDK_Escape && event->keyval != GDK_Return)
+ return FALSE;
+***************
+*** 2223,2228 ****
+--- 2226,2238 ----
+ dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+ {
+ DialogInfo *di = (DialogInfo *)data;
++
++ /* Ignore hitting Enter (or Space) when there is no default button. */
++ if (di->ignore_enter && (event->keyval == GDK_Return
++ || event->keyval == ' '))
++ return TRUE;
++ else /* A different key was pressed, return to normal behavior */
++ di->ignore_enter = FALSE;
+
+ /* Close the dialog when hitting "Esc". */
+ if (event->keyval == GDK_Escape)
+*** ../vim-7.1.068/src/version.c Sun Aug 12 16:55:01 2007
+--- src/version.c Tue Aug 14 14:58:36 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 69,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+148. You find it easier to dial-up the National Weather Service
+ Weather/your_town/now.html than to simply look out the window.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.070 (extra)
+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.1.070 (extra)
+Problem: Win32 GUI: When using confirm() without a default button there
+ still is a default choice.
+Solution: Set focus on something else than a button. (Chris Lubinski)
+Files: src/gui_w32.c
+
+
+*** ../vim-7.1.069/src/gui_w32.c Tue Jun 19 10:09:15 2007
+--- src/gui_w32.c Sat Aug 11 17:39:50 2007
+***************
+*** 2894,2899 ****
+--- 2894,2903 ----
+ (void)SetFocus(hwnd);
+ if (dialog_default_button > IDCANCEL)
+ (void)SetFocus(GetDlgItem(hwnd, dialog_default_button));
++ else
++ /* We don't have a default, set focus on another element of the
++ * dialog window, probably the icon */
++ (void)SetFocus(GetDlgItem(hwnd, DLG_NONBUTTON_CONTROL));
+ return FALSE;
+ }
+
+*** ../vim-7.1.069/src/version.c Tue Aug 14 14:59:41 2007
+--- src/version.c Tue Aug 14 16:55:41 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 70,
+ /**/
+
+--
+You are not really successful until someone claims he sat
+beside you in school.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.071
+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.1.071 (after 7.1.040)
+Problem: Regexp patterns are not tested.
+Solution: Add a basic test, to be expanded later.
+ Also add (commented-out) support for valgrind.
+Files: src/testdir/Makefile, src/testdir/test64.in, src/testdir/test64.ok
+
+
+*** ../vim-7.1.070/src/testdir/Makefile Thu Jul 26 22:55:11 2007
+--- src/testdir/Makefile Tue Aug 14 15:16:08 2007
+***************
+*** 4,9 ****
+--- 4,13 ----
+
+ VIMPROG = ../vim
+
++ # Uncomment this line for using valgrind.
++ # The output goes into a file "valgrind.$PID" (sorry, no test number).
++ # VALGRIND = valgrind --tool=memcheck --num-callers=15 --logfile=valgrind
++
+ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
+ test7.out test8.out test9.out test10.out test11.out \
+ test12.out test13.out test14.out test15.out test17.out \
+***************
+*** 15,21 ****
+ test43.out test44.out test45.out test46.out test47.out \
+ test48.out test49.out test51.out test52.out test53.out \
+ test54.out test55.out test56.out test57.out test58.out \
+! test59.out test60.out test61.out test62.out test63.out
+
+ SCRIPTS_GUI = test16.out
+
+--- 19,26 ----
+ test43.out test44.out test45.out test46.out test47.out \
+ test48.out test49.out test51.out test52.out test53.out \
+ test54.out test55.out test56.out test57.out test58.out \
+! test59.out test60.out test61.out test62.out test63.out \
+! test64.out
+
+ SCRIPTS_GUI = test16.out
+
+***************
+*** 38,44 ****
+
+ test1.out: test1.in
+ -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo
+! $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
+ @/bin/sh -c "if diff test.out $*.ok; \
+ then mv -f test.out $*.out; \
+ else echo; \
+--- 43,49 ----
+
+ test1.out: test1.in
+ -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo
+! $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
+ @/bin/sh -c "if diff test.out $*.ok; \
+ then mv -f test.out $*.out; \
+ else echo; \
+***************
+*** 51,57 ****
+ cp $*.ok test.ok
+ # Sleep a moment to avoid that the xterm title is messed up
+ @-sleep .2
+! -$(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
+ @/bin/sh -c "if test -f test.out; then\
+ if diff test.out $*.ok; \
+ then mv -f test.out $*.out; \
+--- 56,62 ----
+ cp $*.ok test.ok
+ # Sleep a moment to avoid that the xterm title is messed up
+ @-sleep .2
+! -$(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
+ @/bin/sh -c "if test -f test.out; then\
+ if diff test.out $*.ok; \
+ then mv -f test.out $*.out; \
+*** ../vim-7.1.070/src/testdir/test64.in Tue Aug 14 17:26:28 2007
+--- src/testdir/test64.in Tue Aug 14 16:03:44 2007
+***************
+*** 0 ****
+--- 1,52 ----
++ Test for regexp patterns.
++
++ A pattern that gives the expected result produces OK, so that we know it was
++ actually tried.
++
++ STARTTEST
++ :so small.vim
++ :" tl is a List of Lists with:
++ :" regexp pattern
++ :" text to test the pattern on
++ :" expected match (optional)
++ :" expected submatch 1 (optional)
++ :" expected submatch 2 (optional)
++ :" etc.
++ :" When there is no match use only the first two items.
++ :let tl = []
++ :call add(tl, ['b', 'abcdef', 'b'])
++ :call add(tl, ['bc*', 'abccccdef', 'bcccc'])
++ :call add(tl, ['bc\{-}', 'abccccdef', 'b'])
++ :call add(tl, ['bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd'])
++ :call add(tl, ['x', 'abcdef'])
++ :"
++ :for t in tl
++ : let l = matchlist(t[1], t[0])
++ :" check the match itself
++ : if len(l) == 0 && len(t) > 2
++ : $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", did not match, expected: \"' . t[2] . '\"'
++ : elseif len(l) > 0 && len(t) == 2
++ : $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", match: \"' . l[0] . '\", expected no match'
++ : elseif len(t) > 2 && l[0] != t[2]
++ : $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", match: \"' . l[0] . '\", expected: \"' . t[2] . '\"'
++ : else
++ : $put ='OK'
++ : endif
++ : if len(l) > 0
++ :" check all the nine submatches
++ : for i in range(1, 9)
++ : if len(t) <= i + 2
++ : let e = ''
++ : else
++ : let e = t[i + 2]
++ : endif
++ : if l[i] != e
++ : $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"'
++ : endif
++ : endfor
++ : endif
++ :endfor
++ :/^Results/,$wq! test.out
++ ENDTEST
++
++ Results of test64:
+*** ../vim-7.1.070/src/testdir/test64.ok Tue Aug 14 17:26:28 2007
+--- src/testdir/test64.ok Tue Aug 14 16:01:47 2007
+***************
+*** 0 ****
+--- 1,6 ----
++ Results of test64:
++ OK
++ OK
++ OK
++ OK
++ OK
+*** ../vim-7.1.070/src/version.c Tue Aug 14 16:57:04 2007
+--- src/version.c Tue Aug 14 17:25:20 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 71,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+150. You find yourself counting emoticons to get to sleep.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.072 (extra)
+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.1.072 (extra, after 7.1.041 and 7.1.071)
+Problem: Some changes for patch 7.1.071 are in extra files.
+Solution: Update the extra files. Also fix a few warnings from the DOS test
+ makefile.
+Files: src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
+ src/testdir/Make_os2.mak, src/testdir/Make_vms.mms
+
+
+*** ../vim-7.1.071/src/testdir/Make_amiga.mak Thu Jul 26 23:10:50 2007
+--- src/testdir/Make_amiga.mak Tue Aug 14 15:14:03 2007
+***************
+*** 25,31 ****
+ test43.out test44.out test45.out test46.out test47.out \
+ test48.out test51.out test53.out test54.out test55.out \
+ test56.out test57.out test58.out test59.out test60.out \
+! test61.out test62.out test63.out
+
+ .SUFFIXES: .in .out
+
+--- 25,31 ----
+ test43.out test44.out test45.out test46.out test47.out \
+ test48.out test51.out test53.out test54.out test55.out \
+ test56.out test57.out test58.out test59.out test60.out \
+! test61.out test62.out test63.out test64.out
+
+ .SUFFIXES: .in .out
+
+***************
+*** 108,110 ****
+--- 108,111 ----
+ test61.out: test61.in
+ test62.out: test62.in
+ test63.out: test63.in
++ test64.out: test64.in
+*** ../vim-7.1.071/src/testdir/Make_dos.mak Thu Jul 26 23:10:50 2007
+--- src/testdir/Make_dos.mak Tue Aug 14 15:14:25 2007
+***************
+*** 19,25 ****
+ test44.out test45.out test46.out test47.out \
+ test48.out test51.out test53.out test54.out \
+ test55.out test56.out test57.out test58.out test59.out \
+! test60.out test61.out test62.out test63.out
+
+ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
+ test8.out test9.out test11.out test13.out test14.out \
+--- 19,25 ----
+ test44.out test45.out test46.out test47.out \
+ test48.out test51.out test53.out test54.out \
+ test55.out test56.out test57.out test58.out test59.out \
+! test60.out test61.out test62.out test63.out test64.out
+
+ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
+ test8.out test9.out test11.out test13.out test14.out \
+***************
+*** 51,69 ****
+
+ clean:
+ -del *.out
+! -del test.ok
+! -del small.vim
+! -del tiny.vim
+! -del mbyte.vim
+ -del X*
+! -del viminfo
+
+ .in.out:
+ copy $*.ok test.ok
+ $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
+ diff test.out $*.ok
+! -del $*.out
+ rename test.out $*.out
+ -del X*
+ -del test.ok
+! -del viminfo
+--- 51,69 ----
+
+ clean:
+ -del *.out
+! -if exist test.ok del test.ok
+! -if exist small.vim del small.vim
+! -if exist tiny.vim del tiny.vim
+! -if exist mbyte.vim del mbyte.vim
+ -del X*
+! -if exist viminfo del viminfo
+
+ .in.out:
+ copy $*.ok test.ok
+ $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
+ diff test.out $*.ok
+! -if exist $*.out del $*.out
+ rename test.out $*.out
+ -del X*
+ -del test.ok
+! -if exist viminfo del viminfo
+*** ../vim-7.1.071/src/testdir/Make_os2.mak Thu Jul 26 23:10:50 2007
+--- src/testdir/Make_os2.mak Tue Aug 14 15:14:44 2007
+***************
+*** 25,31 ****
+ test43.out test44.out test45.out test46.out test47.out \
+ test48.out test51.out test53.out test54.out test55.out \
+ test56.out test57.out test58.out test59.out test60.out \
+! test61.out test62.out test63.out
+
+ .SUFFIXES: .in .out
+
+--- 25,31 ----
+ test43.out test44.out test45.out test46.out test47.out \
+ test48.out test51.out test53.out test54.out test55.out \
+ test56.out test57.out test58.out test59.out test60.out \
+! test61.out test62.out test63.out test64.out
+
+ .SUFFIXES: .in .out
+
+*** ../vim-7.1.071/src/testdir/Make_vms.mms Thu Jul 26 23:10:50 2007
+--- src/testdir/Make_vms.mms Tue Aug 14 15:15:56 2007
+***************
+*** 4,10 ****
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2007 Jul 24
+ #
+ # This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX.
+ # Edit the lines in the Configuration section below to select.
+--- 4,10 ----
+ # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
+ # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
+ #
+! # Last change: 2007 Aug 14
+ #
+ # This has been tested on VMS 6.2 to 7.2 on DEC Alpha and VAX.
+ # Edit the lines in the Configuration section below to select.
+***************
+*** 59,65 ****
+ test43.out test44.out test45.out test46.out \
+ test48.out test51.out test53.out test54.out test55.out \
+ test56.out test57.out test58.out test59.out test60.out \
+! test61.out test62.out test63.out
+
+ .IFDEF WANT_GUI
+ SCRIPT_GUI = test16.out
+--- 59,65 ----
+ test43.out test44.out test45.out test46.out \
+ test48.out test51.out test53.out test54.out test55.out \
+ test56.out test57.out test58.out test59.out test60.out \
+! test61.out test62.out test63.out test64.out
+
+ .IFDEF WANT_GUI
+ SCRIPT_GUI = test16.out
+*** ../vim-7.1.071/src/version.c Tue Aug 14 17:28:14 2007
+--- src/version.c Tue Aug 14 17:51:21 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 72,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+152. You find yourself falling for someone you've never seen or hardly
+ know, but, boy can he/she TYPE!!!!!!
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.073
+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.1.073 (after 7.1.062)
+Problem: Wrong cursor position and crash when 'preserveindent' is set.
+ (Charles Campbell)
+Solution: Handle the situation that we start without indent. (Chris
+ Lubinski)
+Files: src/misc1.c
+
+
+*** ../vim-7.1.072/src/misc1.c Sat Aug 11 14:32:10 2007
+--- src/misc1.c Tue Aug 14 21:21:49 2007
+***************
+*** 104,110 ****
+ int ind_done = 0; /* measured in spaces */
+ int tab_pad;
+ int retval = FALSE;
+! int orig_char_len = 0; /* number of initial whitespace chars when
+ 'et' and 'pi' are both set */
+
+ /*
+--- 104,110 ----
+ int ind_done = 0; /* measured in spaces */
+ int tab_pad;
+ int retval = FALSE;
+! int orig_char_len = -1; /* number of initial whitespace chars when
+ 'et' and 'pi' are both set */
+
+ /*
+***************
+*** 159,165 ****
+
+ /* Fill to next tabstop with a tab, if possible */
+ tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
+! if (todo >= tab_pad && orig_char_len == 0)
+ {
+ doit = TRUE;
+ todo -= tab_pad;
+--- 159,165 ----
+
+ /* Fill to next tabstop with a tab, if possible */
+ tab_pad = (int)curbuf->b_p_ts - (ind_done % (int)curbuf->b_p_ts);
+! if (todo >= tab_pad && orig_char_len == -1)
+ {
+ doit = TRUE;
+ todo -= tab_pad;
+***************
+*** 206,216 ****
+ /* If 'preserveindent' and 'expandtab' are both set keep the original
+ * characters and allocate accordingly. We will fill the rest with spaces
+ * after the if (!curbuf->b_p_et) below. */
+! if (orig_char_len != 0)
+ {
+ newline = alloc(orig_char_len + size - ind_done + line_len);
+ if (newline == NULL)
+ return FALSE;
+ p = oldline;
+ s = newline;
+ while (orig_char_len > 0)
+--- 206,220 ----
+ /* If 'preserveindent' and 'expandtab' are both set keep the original
+ * characters and allocate accordingly. We will fill the rest with spaces
+ * after the if (!curbuf->b_p_et) below. */
+! if (orig_char_len != -1)
+ {
+ newline = alloc(orig_char_len + size - ind_done + line_len);
+ if (newline == NULL)
+ return FALSE;
++ todo = size - ind_done;
++ ind_len = orig_char_len + todo; /* Set total length of indent in
++ * characters, which may have been
++ * undercounted until now */
+ p = oldline;
+ s = newline;
+ while (orig_char_len > 0)
+***************
+*** 222,230 ****
+ * than old) */
+ while (vim_iswhite(*p))
+ (void)*p++;
+- todo = size - ind_done;
+- ind_len += todo; /* Set total length of indent in characters,
+- * which may have been undercounted until now */
+
+ }
+ else
+--- 226,231 ----
+*** ../vim-7.1.072/src/version.c Tue Aug 14 17:54:37 2007
+--- src/version.c Tue Aug 14 22:14:54 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 73,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+157. You fum through a magazine, you first check to see if it has a web
+ address.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.074
+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.1.074
+Problem: Crash when calling string() on a recurively nested List.
+Solution: Check result value for being NULL. (Yukihiro Nakadaira)
+Files: src/eval.c
+
+
+*** ../vim-7.1.073/src/eval.c Mon Aug 6 22:27:12 2007
+--- src/eval.c Tue Aug 14 22:01:12 2007
+***************
+*** 6802,6808 ****
+ * "numbuf" is used for a number.
+ * Does not put quotes around strings, as ":echo" displays values.
+ * When "copyID" is not NULL replace recursive lists and dicts with "...".
+! * May return NULL;
+ */
+ static char_u *
+ echo_string(tv, tofree, numbuf, copyID)
+--- 6802,6808 ----
+ * "numbuf" is used for a number.
+ * Does not put quotes around strings, as ":echo" displays values.
+ * When "copyID" is not NULL replace recursive lists and dicts with "...".
+! * May return NULL.
+ */
+ static char_u *
+ echo_string(tv, tofree, numbuf, copyID)
+***************
+*** 6887,6893 ****
+ * If the memory is allocated "tofree" is set to it, otherwise NULL.
+ * "numbuf" is used for a number.
+ * Puts quotes around strings, so that they can be parsed back by eval().
+! * May return NULL;
+ */
+ static char_u *
+ tv2string(tv, tofree, numbuf, copyID)
+--- 6887,6893 ----
+ * If the memory is allocated "tofree" is set to it, otherwise NULL.
+ * "numbuf" is used for a number.
+ * Puts quotes around strings, so that they can be parsed back by eval().
+! * May return NULL.
+ */
+ static char_u *
+ tv2string(tv, tofree, numbuf, copyID)
+***************
+*** 14974,14979 ****
+--- 14974,14983 ----
+
+ p1 = tv2string(&(*(listitem_T **)s1)->li_tv, &tofree1, numbuf1, 0);
+ p2 = tv2string(&(*(listitem_T **)s2)->li_tv, &tofree2, numbuf2, 0);
++ if (p1 == NULL)
++ p1 = (char_u *)"";
++ if (p2 == NULL)
++ p2 = (char_u *)"";
+ if (item_compare_ic)
+ res = STRICMP(p1, p2);
+ else
+***************
+*** 15463,15469 ****
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = tv2string(&argvars[0], &tofree, numbuf, 0);
+! if (tofree == NULL)
+ rettv->vval.v_string = vim_strsave(rettv->vval.v_string);
+ }
+
+--- 15467,15474 ----
+
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = tv2string(&argvars[0], &tofree, numbuf, 0);
+! /* Make a copy if we have a value but it's not in allocate memory. */
+! if (rettv->vval.v_string != NULL && tofree == NULL)
+ rettv->vval.v_string = vim_strsave(rettv->vval.v_string);
+ }
+
+***************
+*** 20167,20172 ****
+--- 20174,20180 ----
+ char_u buf[MSG_BUF_LEN];
+ char_u numbuf2[NUMBUFLEN];
+ char_u *tofree;
++ char_u *s;
+
+ msg_puts((char_u *)"(");
+ for (i = 0; i < argcount; ++i)
+***************
+*** 20177,20186 ****
+ msg_outnum((long)argvars[i].vval.v_number);
+ else
+ {
+! trunc_string(tv2string(&argvars[i], &tofree,
+! numbuf2, 0), buf, MSG_BUF_CLEN);
+! msg_puts(buf);
+! vim_free(tofree);
+ }
+ }
+ msg_puts((char_u *)")");
+--- 20185,20197 ----
+ msg_outnum((long)argvars[i].vval.v_number);
+ else
+ {
+! s = tv2string(&argvars[i], &tofree, numbuf2, 0);
+! if (s != NULL)
+! {
+! trunc_string(s, buf, MSG_BUF_CLEN);
+! msg_puts(buf);
+! vim_free(tofree);
+! }
+ }
+ }
+ msg_puts((char_u *)")");
+***************
+*** 20258,20271 ****
+ char_u buf[MSG_BUF_LEN];
+ char_u numbuf2[NUMBUFLEN];
+ char_u *tofree;
+
+ /* The value may be very long. Skip the middle part, so that we
+ * have some idea how it starts and ends. smsg() would always
+ * truncate it at the end. */
+! trunc_string(tv2string(fc.rettv, &tofree, numbuf2, 0),
+! buf, MSG_BUF_CLEN);
+! smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
+! vim_free(tofree);
+ }
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+--- 20269,20286 ----
+ char_u buf[MSG_BUF_LEN];
+ char_u numbuf2[NUMBUFLEN];
+ char_u *tofree;
++ char_u *s;
+
+ /* The value may be very long. Skip the middle part, so that we
+ * have some idea how it starts and ends. smsg() would always
+ * truncate it at the end. */
+! s = tv2string(fc.rettv, &tofree, numbuf2, 0);
+! if (s != NULL)
+! {
+! trunc_string(s, buf, MSG_BUF_CLEN);
+! smsg((char_u *)_("%s returning %s"), sourcing_name, buf);
+! vim_free(tofree);
+! }
+ }
+ msg_puts((char_u *)"\n"); /* don't overwrite this either */
+
+*** ../vim-7.1.073/src/version.c Tue Aug 14 22:15:53 2007
+--- src/version.c Tue Aug 14 22:27:24 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 74,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+159. You get excited whenever discussing your hard drive.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.075
+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.1.075
+Problem: ":let v:statusmsg" reads memory already freed.
+Solution: Don't set v:statusmsg when listing it.
+Files: src/eval.c
+
+
+*** ../vim-7.1.074/src/eval.c Tue Aug 14 22:28:35 2007
+--- src/eval.c Tue Aug 14 22:01:12 2007
+***************
+*** 18022,18028 ****
+ int type;
+ char_u *string;
+ {
+! msg_attr(prefix, 0); /* don't use msg(), it overwrites "v:statusmsg" */
+ if (name != NULL) /* "a:" vars don't have a name stored */
+ msg_puts(name);
+ msg_putchar(' ');
+--- 18022,18030 ----
+ int type;
+ char_u *string;
+ {
+! /* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
+! msg_start();
+! msg_puts(prefix);
+ if (name != NULL) /* "a:" vars don't have a name stored */
+ msg_puts(name);
+ msg_putchar(' ');
+*** ../vim-7.1.074/src/version.c Tue Aug 14 22:28:35 2007
+--- src/version.c Tue Aug 14 22:39:49 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 75,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+160. You get in the elevator and double-click the button for the floor
+ you want.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.076
+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.1.076
+Problem: Another strcpy() with overlapping arguments.
+Solution: Use mch_memmove(). (Dominique Pelle) And another one.
+Files: src/ex_docmd.c, src/normal.c
+
+
+*** ../vim-7.1.075/src/ex_docmd.c Sat Aug 11 15:59:44 2007
+--- src/ex_docmd.c Wed Aug 8 22:28:33 2007
+***************
+*** 4493,4499 ****
+ if (eap->argt & (USECTRLV | XFILE))
+ ++p; /* skip CTRL-V and next char */
+ else
+! STRCPY(p, p + 1); /* remove CTRL-V and skip next char */
+ if (*p == NUL) /* stop at NUL after CTRL-V */
+ break;
+ }
+--- 4493,4500 ----
+ if (eap->argt & (USECTRLV | XFILE))
+ ++p; /* skip CTRL-V and next char */
+ else
+! /* remove CTRL-V and skip next char */
+! mch_memmove(p, p + 1, STRLEN(p));
+ if (*p == NUL) /* stop at NUL after CTRL-V */
+ break;
+ }
+*** ../vim-7.1.075/src/normal.c Wed Aug 8 21:41:19 2007
+--- src/normal.c Sun Aug 12 17:35:20 2007
+***************
+*** 3760,3766 ****
+ extra_len = (int)STRLEN(p);
+ overflow = old_len + extra_len - SHOWCMD_COLS;
+ if (overflow > 0)
+! STRCPY(showcmd_buf, showcmd_buf + overflow);
+ STRCAT(showcmd_buf, p);
+
+ if (char_avail())
+--- 3760,3767 ----
+ extra_len = (int)STRLEN(p);
+ overflow = old_len + extra_len - SHOWCMD_COLS;
+ if (overflow > 0)
+! mch_memmove(showcmd_buf, showcmd_buf + overflow,
+! old_len - overflow + 1);
+ STRCAT(showcmd_buf, p);
+
+ if (char_avail())
+*** ../vim-7.1.075/src/version.c Tue Aug 14 22:40:13 2007
+--- src/version.c Tue Aug 14 22:53:13 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 76,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+161. You get up before the sun rises to check your e-mail, and you
+ find yourself in the very same chair long after the sun has set.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.077
+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.1.077
+Problem: Using "can_spell" without initializing it. (Dominique Pelle)
+Solution: Set a default for get_syntax_attr().
+Files: src/syntax.c
+
+
+*** ../vim-7.1.076/src/syntax.c Thu Jul 26 22:55:11 2007
+--- src/syntax.c Sun Aug 12 19:49:07 2007
+***************
+*** 1727,1732 ****
+--- 1727,1739 ----
+ {
+ int attr = 0;
+
++ if (can_spell != NULL)
++ /* Default: Only do spelling when there is no @Spell cluster or when
++ * ":syn spell toplevel" was used. */
++ *can_spell = syn_buf->b_syn_spell == SYNSPL_DEFAULT
++ ? (syn_buf->b_spell_cluster_id == 0)
++ : (syn_buf->b_syn_spell == SYNSPL_TOP);
++
+ /* check for out of memory situation */
+ if (syn_buf->b_sst_array == NULL)
+ return 0;
+*** ../vim-7.1.076/src/version.c Tue Aug 14 22:54:00 2007
+--- src/version.c Tue Aug 14 23:06:26 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 77,
+ /**/
+
+--
+Send $25.00 for handy leaflet on how to make money by selling leaflets
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.078
+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.1.078
+Problem: Dropping a file name on gvim that contains a CSI byte doesn't work
+ when editing the command line.
+Solution: Escape the CSI byte when inserting in the input buffer. (Yukihiro
+ Nakadaira)
+Files: src/gui.c, src/ui.c
+
+
+*** ../vim-7.1.077/src/gui.c Thu May 10 19:19:15 2007
+--- src/gui.c Tue Aug 14 12:41:43 2007
+***************
+*** 5117,5123 ****
+ p = vim_strsave_escaped(fnames[i], (char_u *)"\\ \t\"|");
+ # endif
+ if (p != NULL)
+! add_to_input_buf(p, (int)STRLEN(p));
+ vim_free(p);
+ vim_free(fnames[i]);
+ }
+--- 5117,5123 ----
+ p = vim_strsave_escaped(fnames[i], (char_u *)"\\ \t\"|");
+ # endif
+ if (p != NULL)
+! add_to_input_buf_csi(p, (int)STRLEN(p));
+ vim_free(p);
+ vim_free(fnames[i]);
+ }
+*** ../vim-7.1.077/src/ui.c Thu May 10 21:14:11 2007
+--- src/ui.c Tue Aug 14 12:41:42 2007
+***************
+*** 1603,1610 ****
+ #if defined(FEAT_GUI) || defined(FEAT_MOUSE_GPM) \
+ || defined(FEAT_XCLIPBOARD) || defined(VMS) \
+ || defined(FEAT_SNIFF) || defined(FEAT_CLIENTSERVER) \
+- || (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \
+- || defined(FEAT_MENU))) \
+ || defined(PROTO)
+ /*
+ * Add the given bytes to the input buffer
+--- 1603,1608 ----
+***************
+*** 1630,1636 ****
+ }
+ #endif
+
+! #if (defined(FEAT_XIM) && defined(FEAT_GUI_GTK)) \
+ || (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) \
+ || (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \
+ || defined(FEAT_MENU))) \
+--- 1628,1636 ----
+ }
+ #endif
+
+! #if ((defined(FEAT_XIM) || defined(FEAT_DND)) && defined(FEAT_GUI_GTK)) \
+! || defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MAC) \
+ || (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) \
+ || (defined(FEAT_GUI) && (!defined(USE_ON_FLY_SCROLL) \
+ || defined(FEAT_MENU))) \
+*** ../vim-7.1.077/src/version.c Tue Aug 14 23:06:51 2007
+--- src/version.c Wed Aug 15 20:07:06 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 78,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+164. You got out to buy software, instead of going out for a beer.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.079
+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.1.079
+Problem: When the locale is "C" and 'encoding' is "latin1" then the "@"
+ character in 'isfname', 'isprint', etc. doesn't pick up accented
+ characters.
+Solution: Instead of isalpha() use MB_ISLOWER() and MB_ISUPPER().
+Files: src/charset.c, src/macros.h
+
+
+*** ../vim-7.1.078/src/charset.c Mon Aug 6 22:27:12 2007
+--- src/charset.c Tue Aug 14 13:43:30 2007
+***************
+*** 207,213 ****
+ }
+ while (c <= c2)
+ {
+! if (!do_isalpha || isalpha(c)
+ #ifdef FEAT_FKMAP
+ || (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))
+ #endif
+--- 207,216 ----
+ }
+ while (c <= c2)
+ {
+! /* Use the MB_ functions here, because isalpha() doesn't
+! * work properly when 'encoding' is "latin1" and the locale is
+! * "C". */
+! if (!do_isalpha || MB_ISLOWER(c) || MB_ISUPPER(c)
+ #ifdef FEAT_FKMAP
+ || (p_altkeymap && (F_isalpha(c) || F_isdigit(c)))
+ #endif
+*** ../vim-7.1.078/src/macros.h Thu May 10 19:21:00 2007
+--- src/macros.h Sat Aug 4 13:44:18 2007
+***************
+*** 54,63 ****
+
+ /*
+ * toupper() and tolower() that use the current locale.
+! * On some systems toupper()/tolower() only work on lower/uppercase characters
+ * Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the
+ * range 0 - 255. toupper()/tolower() on some systems can't handle others.
+! * Note: for UTF-8 use utf_toupper() and utf_tolower().
+ */
+ #ifdef MSWIN
+ # define TOUPPER_LOC(c) toupper_tab[(c) & 255]
+--- 54,65 ----
+
+ /*
+ * toupper() and tolower() that use the current locale.
+! * On some systems toupper()/tolower() only work on lower/uppercase
+! * characters, first use islower() or isupper() then.
+ * Careful: Only call TOUPPER_LOC() and TOLOWER_LOC() with a character in the
+ * range 0 - 255. toupper()/tolower() on some systems can't handle others.
+! * Note: It is often better to use MB_TOLOWER() and MB_TOUPPER(), because many
+! * toupper() and tolower() implementations only work for ASCII.
+ */
+ #ifdef MSWIN
+ # define TOUPPER_LOC(c) toupper_tab[(c) & 255]
+*** ../vim-7.1.078/src/version.c Wed Aug 15 20:07:53 2007
+--- src/version.c Wed Aug 15 20:39:18 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 79,
+ /**/
+
+--
+You're as much use as a condom machine at the Vatican.
+ -- Rimmer to Holly in Red Dwarf 'Queeg'
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.080 (extra)
+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.1.080 (extra)
+Problem: Compiler warnings for using "const char *" for "char *".
+Solution: Add type casts. (Chris Sutcliffe)
+Files: src/GvimExt/gvimext.cpp
+
+
+*** ../vim-7.1.079/src/GvimExt/gvimext.cpp Thu May 10 21:09:38 2007
+--- src/GvimExt/gvimext.cpp Thu Aug 16 21:25:56 2007
+***************
+*** 69,82 ****
+
+ // Registry didn't work, use the search path.
+ if (name[0] == 0)
+! strcpy(name, searchpath("gvim.exe"));
+
+ if (!runtime)
+ {
+ // Only when looking for the executable, not the runtime dir, we can
+ // search for the batch file or a name without a path.
+ if (name[0] == 0)
+! strcpy(name, searchpath("gvim.bat"));
+ if (name[0] == 0)
+ strcpy(name, "gvim"); // finds gvim.bat or gvim.exe
+
+--- 69,82 ----
+
+ // Registry didn't work, use the search path.
+ if (name[0] == 0)
+! strcpy(name, searchpath((char *)"gvim.exe"));
+
+ if (!runtime)
+ {
+ // Only when looking for the executable, not the runtime dir, we can
+ // search for the batch file or a name without a path.
+ if (name[0] == 0)
+! strcpy(name, searchpath((char *)"gvim.bat"));
+ if (name[0] == 0)
+ strcpy(name, "gvim"); // finds gvim.bat or gvim.exe
+
+***************
+*** 152,160 ****
+ FARPROC *ptr;
+ } libintl_entry[] =
+ {
+! {"gettext", (FARPROC*)&dyn_libintl_gettext},
+! {"textdomain", (FARPROC*)&dyn_libintl_textdomain},
+! {"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
+ {NULL, NULL}
+ };
+
+--- 152,160 ----
+ FARPROC *ptr;
+ } libintl_entry[] =
+ {
+! {(char *)"gettext", (FARPROC*)&dyn_libintl_gettext},
+! {(char *)"textdomain", (FARPROC*)&dyn_libintl_textdomain},
+! {(char *)"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
+ {NULL, NULL}
+ };
+
+***************
+*** 835,841 ****
+ (LPTSTR)location) > (HINSTANCE)32)
+ return location;
+ }
+! return "";
+ }
+ # endif
+ #endif
+--- 835,841 ----
+ (LPTSTR)location) > (HINSTANCE)32)
+ return location;
+ }
+! return (char *)"";
+ }
+ # endif
+ #endif
+*** ../vim-7.1.079/src/version.c Wed Aug 15 20:40:45 2007
+--- src/version.c Sat Aug 18 16:58:36 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 80,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+192. Your boss asks you to "go fer" coffee and you come up with 235 FTP sites.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.081
+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.1.081
+Problem: Command line completion for a shell command: "cat </tmp/file<Tab>"
+ doesn't work.
+Solution: Start the file name at any character that can't be in a file name.
+ (Martin Toft)
+Files: src/ex_docmd.c
+
+
+*** ../vim-7.1.080/src/ex_docmd.c Tue Aug 14 22:54:00 2007
+--- src/ex_docmd.c Sat Aug 18 14:58:53 2007
+***************
+*** 3281,3319 ****
+
+ if (ea.argt & XFILE)
+ {
+! int in_quote = FALSE;
+! char_u *bow = NULL; /* Beginning of word */
+
+ /*
+ * Allow spaces within back-quotes to count as part of the argument
+ * being expanded.
+ */
+ xp->xp_pattern = skipwhite(arg);
+! for (p = xp->xp_pattern; *p; )
+ {
+! if (*p == '\\' && p[1] != NUL)
+ ++p;
+ #ifdef SPACE_IN_FILENAME
+! else if (vim_iswhite(*p) && (!(ea.argt & NOSPC) || usefilter))
+ #else
+! else if (vim_iswhite(*p))
+ #endif
+ {
+! p = skipwhite(p);
+ if (in_quote)
+ bow = p;
+ else
+ xp->xp_pattern = p;
+! --p;
+! }
+! else if (*p == '`')
+! {
+! if (!in_quote)
+! {
+! xp->xp_pattern = p;
+! bow = p + 1;
+! }
+! in_quote = !in_quote;
+ }
+ mb_ptr_adv(p);
+ }
+--- 3281,3344 ----
+
+ if (ea.argt & XFILE)
+ {
+! int c;
+! int in_quote = FALSE;
+! char_u *bow = NULL; /* Beginning of word */
+
+ /*
+ * Allow spaces within back-quotes to count as part of the argument
+ * being expanded.
+ */
+ xp->xp_pattern = skipwhite(arg);
+! p = xp->xp_pattern;
+! while (*p != NUL)
+ {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! c = mb_ptr2char(p);
+! else
+! #endif
+! c = *p;
+! if (c == '\\' && p[1] != NUL)
+ ++p;
++ else if (c == '`')
++ {
++ if (!in_quote)
++ {
++ xp->xp_pattern = p;
++ bow = p + 1;
++ }
++ in_quote = !in_quote;
++ }
+ #ifdef SPACE_IN_FILENAME
+! else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter))
+ #else
+! else if (!vim_isfilec(c))
+ #endif
+ {
+! while (*p != NUL)
+! {
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! c = mb_ptr2char(p);
+! else
+! #endif
+! c = *p;
+! if (c == '`' || vim_isfilec(c))
+! break;
+! #ifdef FEAT_MBYTE
+! if (has_mbyte)
+! len = (*mb_ptr2len)(p);
+! else
+! #endif
+! len = 1;
+! mb_ptr_adv(p);
+! }
+ if (in_quote)
+ bow = p;
+ else
+ xp->xp_pattern = p;
+! p -= len;
+ }
+ mb_ptr_adv(p);
+ }
+*** ../vim-7.1.080/src/version.c Sat Aug 18 16:59:43 2007
+--- src/version.c Sat Aug 18 17:45:54 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 81,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+194. Your business cards contain your e-mail and home page address.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.082
+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.1.082
+Problem: After a ":split" the matchparen highlighting isn't there.
+Solution: Install a WinEnter autocommand. Also fixes that after
+ ":NoMatchParen" only the current window is updated. (Martin Toft)
+Files: runtime/doc/pi_paren.txt, runtime/plugin/matchparen.vim
+
+
+*** ../vim-7.1.081/runtime/doc/pi_paren.txt Sat May 12 16:23:41 2007
+--- runtime/doc/pi_paren.txt Sat Aug 18 15:08:32 2007
+***************
+*** 12,19 ****
+ You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
+ :let loaded_matchparen = 1
+
+! The plugin installs CursorMoved autocommands to redefine the match
+! highlighting.
+
+ To disable the plugin after it was loaded use this command: >
+
+--- 12,19 ----
+ You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
+ :let loaded_matchparen = 1
+
+! The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
+! redefine the match highlighting.
+
+ To disable the plugin after it was loaded use this command: >
+
+*** ../vim-7.1.081/runtime/plugin/matchparen.vim Thu Aug 2 23:00:06 2007
+--- runtime/plugin/matchparen.vim Sat Aug 18 15:08:32 2007
+***************
+*** 1,6 ****
+ " Vim plugin for showing matching parens
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2007 Jul 30
+
+ " Exit quickly when:
+ " - this plugin was already loaded (or disabled)
+--- 1,6 ----
+ " Vim plugin for showing matching parens
+ " Maintainer: Bram Moolenaar <Bram@vim.org>
+! " Last Change: 2007 Aug 8
+
+ " Exit quickly when:
+ " - this plugin was already loaded (or disabled)
+***************
+*** 13,19 ****
+
+ augroup matchparen
+ " Replace all matchparen autocommands
+! autocmd! CursorMoved,CursorMovedI * call s:Highlight_Matching_Pair()
+ augroup END
+
+ " Skip the rest if it was already done.
+--- 13,19 ----
+
+ augroup matchparen
+ " Replace all matchparen autocommands
+! autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
+ augroup END
+
+ " Skip the rest if it was already done.
+***************
+*** 126,132 ****
+ endfunction
+
+ " Define commands that will disable and enable the plugin.
+! command! NoMatchParen 3match none | unlet! g:loaded_matchparen | au! matchparen
+! command! DoMatchParen runtime plugin/matchparen.vim | doau CursorMoved
+
+ let &cpo = cpo_save
+--- 126,133 ----
+ endfunction
+
+ " Define commands that will disable and enable the plugin.
+! command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
+! \ au! matchparen
+! command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
+
+ let &cpo = cpo_save
+*** ../vim-7.1.081/src/version.c Sat Aug 18 17:46:50 2007
+--- src/version.c Sat Aug 18 18:19:20 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 82,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+195. Your cat has its own home page.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.083
+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.1.083 (after 7.1.081)
+Problem: Command line completion doesn't work with wildcards.
+Solution: Add vim_isfilec_or_wc() and use it. (Martin Toft)
+Files: src/charset.c, src/proto/charset.pro, src/ex_docmd.c
+
+
+*** ../vim-7.1.082/src/charset.c Wed Aug 15 20:40:45 2007
+--- src/charset.c Sun Aug 19 22:30:25 2007
+***************
+*** 932,937 ****
+--- 932,954 ----
+ }
+
+ /*
++ * return TRUE if 'c' is a valid file-name character or a wildcard character
++ * Assume characters above 0x100 are valid (multi-byte).
++ * Explicitly interpret ']' as a wildcard character as mch_has_wildcard("]")
++ * returns false.
++ */
++ int
++ vim_isfilec_or_wc(c)
++ int c;
++ {
++ char_u buf[2];
++
++ buf[0] = (char_u)c;
++ buf[1] = NUL;
++ return vim_isfilec(c) || c == ']' || mch_has_wildcard(buf);
++ }
++
++ /*
+ * return TRUE if 'c' is a printable character
+ * Assume characters above 0x100 are printable (multi-byte), except for
+ * Unicode.
+*** ../vim-7.1.082/src/proto/charset.pro Sat May 5 19:21:32 2007
+--- src/proto/charset.pro Sun Aug 19 22:30:28 2007
+***************
+*** 21,26 ****
+--- 21,27 ----
+ int vim_iswordp __ARGS((char_u *p));
+ int vim_iswordc_buf __ARGS((char_u *p, buf_T *buf));
+ int vim_isfilec __ARGS((int c));
++ int vim_isfilec_or_wc __ARGS((int c));
+ int vim_isprintc __ARGS((int c));
+ int vim_isprintc_strict __ARGS((int c));
+ int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col));
+*** ../vim-7.1.082/src/ex_docmd.c Sat Aug 18 17:46:50 2007
+--- src/ex_docmd.c Sun Aug 19 22:29:17 2007
+***************
+*** 3311,3319 ****
+ in_quote = !in_quote;
+ }
+ #ifdef SPACE_IN_FILENAME
+! else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter))
+ #else
+! else if (!vim_isfilec(c))
+ #endif
+ {
+ while (*p != NUL)
+--- 3311,3320 ----
+ in_quote = !in_quote;
+ }
+ #ifdef SPACE_IN_FILENAME
+! else if (!vim_isfilec_or_wc(c)
+! && (!(ea.argt & NOSPC) || usefilter))
+ #else
+! else if (!vim_isfilec_or_wc(c))
+ #endif
+ {
+ while (*p != NUL)
+***************
+*** 3324,3330 ****
+ else
+ #endif
+ c = *p;
+! if (c == '`' || vim_isfilec(c))
+ break;
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+--- 3325,3331 ----
+ else
+ #endif
+ c = *p;
+! if (c == '`' || vim_isfilec_or_wc(c))
+ break;
+ #ifdef FEAT_MBYTE
+ if (has_mbyte)
+*** ../vim-7.1.082/src/version.c Sat Aug 18 18:20:57 2007
+--- src/version.c Sun Aug 19 22:31:43 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 83,
+ /**/
+
+--
+ "You mean there really is an answer?"
+ "Yes! But you're not going to like it!"
+ "Oh do please tell us!"
+ "You're really not going to like it!"
+ "but we MUST know - tell us"
+ "Alright, the answer is...."
+ "yes..."
+ "... is ..."
+ "yes... come on!"
+ "is 42!"
+ (Douglas Adams - The Hitchhiker's Guide to the Galaxy)
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.084
+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.1.084
+Problem: Using the "-nb" argument twice causes netbeans not to get
+ fileOpened events.
+Solution: Change "&" to "&&". (Xavier de Gaye)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.1.083/src/ex_cmds.c Wed Jul 25 22:55:22 2007
+--- src/ex_cmds.c Tue Aug 21 15:02:43 2007
+***************
+*** 3776,3782 ****
+ workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro);
+ # endif
+ # ifdef FEAT_NETBEANS_INTG
+! if (usingNetbeans & ((flags & ECMD_SET_HELP) != ECMD_SET_HELP))
+ netbeans_file_opened(curbuf);
+ # endif
+ }
+--- 3787,3793 ----
+ workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro);
+ # endif
+ # ifdef FEAT_NETBEANS_INTG
+! if (usingNetbeans && ((flags & ECMD_SET_HELP) != ECMD_SET_HELP))
+ netbeans_file_opened(curbuf);
+ # endif
+ }
+*** ../vim-7.1.083/src/version.c Sun Aug 19 22:42:27 2007
+--- src/version.c Tue Aug 21 15:04:03 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 84,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+220. Your wife asks for sex and you tell her where to find you on IRC.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.085
+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.1.085
+Problem: ":e fold.c" then ":sp fold.c" results in folds of original window
+ to disappear. (Akita Noek)
+Solution: Invoke foldUpdateAll() for all windows of the changed buffer.
+ (Martin Toft)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.1.084/src/ex_cmds.c Tue Aug 21 15:05:54 2007
+--- src/ex_cmds.c Tue Aug 21 15:02:43 2007
+***************
+*** 2974,2980 ****
+ * 'fnum' is the number of the file, if zero use ffname/sfname.
+ *
+ * Return 1 for "normal" error, 2 for "not written" error, 0 for success
+! * -1 for succesfully opening another file.
+ * 'lnum' is the line number for the cursor in the new file (if non-zero).
+ */
+ int
+--- 2974,2980 ----
+ * 'fnum' is the number of the file, if zero use ffname/sfname.
+ *
+ * Return 1 for "normal" error, 2 for "not written" error, 0 for success
+! * -1 for successfully opening another file.
+ * 'lnum' is the line number for the cursor in the new file (if non-zero).
+ */
+ int
+***************
+*** 3584,3592 ****
+ curwin_init();
+
+ #ifdef FEAT_FOLDING
+! /* It's like all lines in the buffer changed. Need to update
+! * automatic folding. */
+ foldUpdateAll(curwin);
+ #endif
+
+ /* Change directories when the 'acd' option is set. */
+--- 3584,3603 ----
+ curwin_init();
+
+ #ifdef FEAT_FOLDING
+! /* It's possible that all lines in the buffer changed. Need to update
+! * automatic folding for all windows where it's used. */
+! # ifdef FEAT_WINDOWS
+! {
+! win_T *win;
+! tabpage_T *tp;
+!
+! FOR_ALL_TAB_WINDOWS(tp, win)
+! if (win->w_buffer == curbuf)
+! foldUpdateAll(win);
+! }
+! # else
+ foldUpdateAll(curwin);
++ # endif
+ #endif
+
+ /* Change directories when the 'acd' option is set. */
+*** ../vim-7.1.084/src/version.c Tue Aug 21 15:05:54 2007
+--- src/version.c Tue Aug 21 15:26:43 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 85,
+ /**/
+
+--
+Your fault: core dumped
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.086
+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.1.086
+Problem: Crash when using specific Python syntax highlighting. (Quirk)
+Solution: Check for a negative index, coming from a keyword match at the
+ start of a line from a saved state.
+Files: src/syntax.c
+
+
+*** ../vim-7.1.085/src/syntax.c Tue Aug 14 23:06:51 2007
+--- src/syntax.c Tue Aug 21 17:13:51 2007
+***************
+*** 279,285 ****
+ */
+ typedef struct state_item
+ {
+! int si_idx; /* index of syntax pattern */
+ int si_id; /* highlight group ID for keywords */
+ int si_trans_id; /* idem, transparancy removed */
+ int si_m_lnum; /* lnum of the match */
+--- 279,286 ----
+ */
+ typedef struct state_item
+ {
+! int si_idx; /* index of syntax pattern or
+! KEYWORD_IDX */
+ int si_id; /* highlight group ID for keywords */
+ int si_trans_id; /* idem, transparancy removed */
+ int si_m_lnum; /* lnum of the match */
+***************
+*** 837,845 ****
+ current_lnum = end_lnum;
+ break;
+ }
+! spp = &(SYN_ITEMS(syn_buf)[cur_si->si_idx]);
+! found_flags = spp->sp_flags;
+! found_match_idx = spp->sp_sync_idx;
+ found_current_lnum = current_lnum;
+ found_current_col = current_col;
+ found_m_endpos = cur_si->si_m_endpos;
+--- 838,855 ----
+ current_lnum = end_lnum;
+ break;
+ }
+! if (cur_si->si_idx < 0)
+! {
+! /* Cannot happen? */
+! found_flags = 0;
+! found_match_idx = KEYWORD_IDX;
+! }
+! else
+! {
+! spp = &(SYN_ITEMS(syn_buf)[cur_si->si_idx]);
+! found_flags = spp->sp_flags;
+! found_match_idx = spp->sp_sync_idx;
+! }
+ found_current_lnum = current_lnum;
+ found_current_col = current_col;
+ found_m_endpos = cur_si->si_m_endpos;
+***************
+*** 2533,2538 ****
+--- 2543,2552 ----
+ stateitem_T *sip = &CUR_STATE(idx);
+ synpat_T *spp;
+
++ /* This should not happen... */
++ if (sip->si_idx < 0)
++ return;
++
+ spp = &(SYN_ITEMS(syn_buf)[sip->si_idx]);
+ if (sip->si_flags & HL_MATCH)
+ sip->si_id = spp->sp_syn_match_id;
+***************
+*** 2648,2653 ****
+--- 2662,2671 ----
+ lpos_T end_endpos;
+ int end_idx;
+
++ /* return quickly for a keyword */
++ if (sip->si_idx < 0)
++ return;
++
+ /* Don't update when it's already done. Can be a match of an end pattern
+ * that started in a previous line. Watch out: can also be a "keepend"
+ * from a containing item. */
+***************
+*** 2759,2764 ****
+--- 2777,2786 ----
+ lpos_T pos;
+ char_u *line;
+ int had_match = FALSE;
++
++ /* just in case we are invoked for a keyword */
++ if (idx < 0)
++ return;
+
+ /*
+ * Check for being called with a START pattern.
+*** ../vim-7.1.085/src/version.c Tue Aug 21 15:28:32 2007
+--- src/version.c Tue Aug 21 17:21:06 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 86,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+222. You send more than 20 personal e-mails a day.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.087
+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.1.087
+Problem: Reading past ":cscope find" command. Writing past end of a buffer.
+Solution: Check length of the argument before using the pattern. Use
+ vim_strncpy(). (Dominique Pelle)
+Files: if_cscope.c
+
+
+*** ../vim-7.1.086/src/if_cscope.c Sun Mar 11 15:48:29 2007
+--- src/if_cscope.c Sun Aug 19 22:17:09 2007
+***************
+*** 73,78 ****
+--- 73,80 ----
+
+
+ static csinfo_T csinfo[CSCOPE_MAX_CONNECTIONS];
++ static int eap_arg_len; /* length of eap->arg, set in
++ cs_lookup_cmd() */
+ static cscmd_T cs_cmds[] =
+ {
+ { "add", cs_add,
+***************
+*** 260,273 ****
+
+ if ((p = cs_manage_matches(NULL, NULL, -1, Get)) == NULL)
+ return TRUE;
+!
+! if ((int)strlen(p) > size)
+! {
+! strncpy((char *)buf, p, size - 1);
+! buf[size] = '\0';
+! }
+! else
+! (void)strcpy((char *)buf, p);
+
+ return FALSE;
+ } /* cs_fgets */
+--- 262,268 ----
+
+ if ((p = cs_manage_matches(NULL, NULL, -1, Get)) == NULL)
+ return TRUE;
+! vim_strncpy(buf, (char_u *)p, size - 1);
+
+ return FALSE;
+ } /* cs_fgets */
+***************
+*** 386,392 ****
+ * PRIVATE: cs_add
+ *
+ * add cscope database or a directory name (to look for cscope.out)
+! * the the cscope connection list
+ *
+ * MAXPATHL 256
+ */
+--- 381,387 ----
+ * PRIVATE: cs_add
+ *
+ * add cscope database or a directory name (to look for cscope.out)
+! * to the cscope connection list
+ *
+ * MAXPATHL 256
+ */
+***************
+*** 966,972 ****
+ }
+
+ pat = opt + strlen(opt) + 1;
+! if (pat == NULL || (pat != NULL && pat[0] == '\0'))
+ {
+ cs_usage_msg(Find);
+ return FALSE;
+--- 961,967 ----
+ }
+
+ pat = opt + strlen(opt) + 1;
+! if (pat >= (char *)eap->arg + eap_arg_len)
+ {
+ cs_usage_msg(Find);
+ return FALSE;
+***************
+*** 1317,1323 ****
+ #else
+ /* compare pathnames first */
+ && ((fullpathcmp(csinfo[j].fname, fname, FALSE) & FPC_SAME)
+! /* if not Windows 9x, test index file atributes too */
+ || (!mch_windows95()
+ && csinfo[j].nVolume == bhfi.dwVolumeSerialNumber
+ && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh
+--- 1312,1318 ----
+ #else
+ /* compare pathnames first */
+ && ((fullpathcmp(csinfo[j].fname, fname, FALSE) & FPC_SAME)
+! /* if not Windows 9x, test index file attributes too */
+ || (!mch_windows95()
+ && csinfo[j].nVolume == bhfi.dwVolumeSerialNumber
+ && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh
+***************
+*** 1401,1406 ****
+--- 1396,1404 ----
+ if (eap->arg == NULL)
+ return NULL;
+
++ /* Store length of eap->arg before it gets modified by strtok(). */
++ eap_arg_len = STRLEN(eap->arg);
++
+ if ((stok = strtok((char *)(eap->arg), (const char *)" ")) == NULL)
+ return NULL;
+
+***************
+*** 2195,2201 ****
+ cs_add_common(dblist[i], pplist[i], fllist[i]);
+ if (p_csverbose)
+ {
+! /* dont' use smsg_attr because want to display
+ * connection number in the same line as
+ * "Added cscope database..."
+ */
+--- 2193,2199 ----
+ cs_add_common(dblist[i], pplist[i], fllist[i]);
+ if (p_csverbose)
+ {
+! /* don't use smsg_attr() because we want to display the
+ * connection number in the same line as
+ * "Added cscope database..."
+ */
+*** ../vim-7.1.086/src/version.c Tue Aug 21 17:29:04 2007
+--- src/version.c Tue Aug 21 17:59:42 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 87,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+223. You set up a web-cam as your home's security system.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.088 (extra)
+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.1.088 (extra)
+Problem: The coordinates used by ":winpos" differ from what getwinposx()
+ and getwinposy() return.
+Solution: Use MoveWindowStructure() instead of MoveWindow(). (Michael Henry)
+Files: src/gui_mac.c
+
+
+*** ../vim-7.1.087/src/gui_mac.c Tue Jun 19 16:33:53 2007
+--- src/gui_mac.c Wed Aug 29 20:33:34 2007
+***************
+*** 3149,3155 ****
+ /* TODO: Should make sure the window is move within range
+ * e.g.: y > ~16 [Menu bar], x > 0, x < screen width
+ */
+! MoveWindow(gui.VimWindow, x, y, TRUE);
+ }
+
+ void
+--- 3149,3155 ----
+ /* TODO: Should make sure the window is move within range
+ * e.g.: y > ~16 [Menu bar], x > 0, x < screen width
+ */
+! MoveWindowStructure(gui.VimWindow, x, y, TRUE);
+ }
+
+ void
+***************
+*** 5556,5562 ****
+ * SetDialogTracksCursor() : Get the I-beam cursor over input box
+ * MoveDialogItem(): Probably better than SetDialogItem
+ * SizeDialogItem(): (but is it Carbon Only?)
+! * AutoSizeDialog(): Magic resize of dialog based on text lenght
+ */
+ }
+ #endif /* FEAT_DIALOG_GUI */
+--- 5556,5562 ----
+ * SetDialogTracksCursor() : Get the I-beam cursor over input box
+ * MoveDialogItem(): Probably better than SetDialogItem
+ * SizeDialogItem(): (but is it Carbon Only?)
+! * AutoSizeDialog(): Magic resize of dialog based on text length
+ */
+ }
+ #endif /* FEAT_DIALOG_GUI */
+*** ../vim-7.1.087/src/version.c Tue Aug 21 18:02:58 2007
+--- src/version.c Thu Aug 30 10:32:28 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 88,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+10E. You start counting in hex.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.089
+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.1.089
+Problem: ":let loaded_getscriptPlugin" doesn't clear to eol, result is
+ "#1in".
+Solution: Clear to the end of the screen after displaying the first variable
+ value.
+Files: src/eval.c
+
+
+*** ../vim-7.1.088/src/eval.c Tue Aug 14 22:40:13 2007
+--- src/eval.c Wed Aug 29 22:40:15 2007
+***************
+*** 369,385 ****
+ static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));
+ static char_u *skip_var_list __ARGS((char_u *arg, int *var_count, int *semicolon));
+ static char_u *skip_var_one __ARGS((char_u *arg));
+! static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty));
+! static void list_glob_vars __ARGS((void));
+! static void list_buf_vars __ARGS((void));
+! static void list_win_vars __ARGS((void));
+ #ifdef FEAT_WINDOWS
+! static void list_tab_vars __ARGS((void));
+ #endif
+! static void list_vim_vars __ARGS((void));
+! static void list_script_vars __ARGS((void));
+! static void list_func_vars __ARGS((void));
+! static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
+ static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
+ static int check_changedtick __ARGS((char_u *arg));
+ static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
+--- 369,385 ----
+ static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));
+ static char_u *skip_var_list __ARGS((char_u *arg, int *var_count, int *semicolon));
+ static char_u *skip_var_one __ARGS((char_u *arg));
+! static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty, int *first));
+! static void list_glob_vars __ARGS((int *first));
+! static void list_buf_vars __ARGS((int *first));
+! static void list_win_vars __ARGS((int *first));
+ #ifdef FEAT_WINDOWS
+! static void list_tab_vars __ARGS((int *first));
+ #endif
+! static void list_vim_vars __ARGS((int *first));
+! static void list_script_vars __ARGS((int *first));
+! static void list_func_vars __ARGS((int *first));
+! static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first));
+ static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
+ static int check_changedtick __ARGS((char_u *arg));
+ static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
+***************
+*** 704,711 ****
+ static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
+ static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
+ static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
+! static void list_one_var __ARGS((dictitem_T *v, char_u *prefix));
+! static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string));
+ static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
+ static int var_check_ro __ARGS((int flags, char_u *name));
+ static int var_check_fixed __ARGS((int flags, char_u *name));
+--- 704,711 ----
+ static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
+ static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
+ static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
+! static void list_one_var __ARGS((dictitem_T *v, char_u *prefix, int *first));
+! static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string, int *first));
+ static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
+ static int var_check_ro __ARGS((int flags, char_u *name));
+ static int var_check_fixed __ARGS((int flags, char_u *name));
+***************
+*** 1699,1704 ****
+--- 1699,1705 ----
+ int semicolon = 0;
+ char_u op[2];
+ char_u *argend;
++ int first = TRUE;
+
+ argend = skip_var_list(arg, &var_count, &semicolon);
+ if (argend == NULL)
+***************
+*** 1715,1733 ****
+ EMSG(_(e_invarg));
+ else if (!ends_excmd(*arg))
+ /* ":let var1 var2" */
+! arg = list_arg_vars(eap, arg);
+ else if (!eap->skip)
+ {
+ /* ":let" */
+! list_glob_vars();
+! list_buf_vars();
+! list_win_vars();
+ #ifdef FEAT_WINDOWS
+! list_tab_vars();
+ #endif
+! list_script_vars();
+! list_func_vars();
+! list_vim_vars();
+ }
+ eap->nextcmd = check_nextcmd(arg);
+ }
+--- 1716,1734 ----
+ EMSG(_(e_invarg));
+ else if (!ends_excmd(*arg))
+ /* ":let var1 var2" */
+! arg = list_arg_vars(eap, arg, &first);
+ else if (!eap->skip)
+ {
+ /* ":let" */
+! list_glob_vars(&first);
+! list_buf_vars(&first);
+! list_win_vars(&first);
+ #ifdef FEAT_WINDOWS
+! list_tab_vars(&first);
+ #endif
+! list_script_vars(&first);
+! list_func_vars(&first);
+! list_vim_vars(&first);
+ }
+ eap->nextcmd = check_nextcmd(arg);
+ }
+***************
+*** 1932,1941 ****
+ * If "empty" is TRUE also list NULL strings as empty strings.
+ */
+ static void
+! list_hashtable_vars(ht, prefix, empty)
+ hashtab_T *ht;
+ char_u *prefix;
+ int empty;
+ {
+ hashitem_T *hi;
+ dictitem_T *di;
+--- 1933,1943 ----
+ * If "empty" is TRUE also list NULL strings as empty strings.
+ */
+ static void
+! list_hashtable_vars(ht, prefix, empty, first)
+ hashtab_T *ht;
+ char_u *prefix;
+ int empty;
++ int *first;
+ {
+ hashitem_T *hi;
+ dictitem_T *di;
+***************
+*** 1950,1956 ****
+ di = HI2DI(hi);
+ if (empty || di->di_tv.v_type != VAR_STRING
+ || di->di_tv.vval.v_string != NULL)
+! list_one_var(di, prefix);
+ }
+ }
+ }
+--- 1952,1958 ----
+ di = HI2DI(hi);
+ if (empty || di->di_tv.v_type != VAR_STRING
+ || di->di_tv.vval.v_string != NULL)
+! list_one_var(di, prefix, first);
+ }
+ }
+ }
+***************
+*** 1959,1990 ****
+ * List global variables.
+ */
+ static void
+! list_glob_vars()
+ {
+! list_hashtable_vars(&globvarht, (char_u *)"", TRUE);
+ }
+
+ /*
+ * List buffer variables.
+ */
+ static void
+! list_buf_vars()
+ {
+ char_u numbuf[NUMBUFLEN];
+
+! list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:", TRUE);
+
+ sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick);
+! list_one_var_a((char_u *)"b:", (char_u *)"changedtick", VAR_NUMBER, numbuf);
+ }
+
+ /*
+ * List window variables.
+ */
+ static void
+! list_win_vars()
+ {
+! list_hashtable_vars(&curwin->w_vars.dv_hashtab, (char_u *)"w:", TRUE);
+ }
+
+ #ifdef FEAT_WINDOWS
+--- 1961,1998 ----
+ * List global variables.
+ */
+ static void
+! list_glob_vars(first)
+! int *first;
+ {
+! list_hashtable_vars(&globvarht, (char_u *)"", TRUE, first);
+ }
+
+ /*
+ * List buffer variables.
+ */
+ static void
+! list_buf_vars(first)
+! int *first;
+ {
+ char_u numbuf[NUMBUFLEN];
+
+! list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:",
+! TRUE, first);
+
+ sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick);
+! list_one_var_a((char_u *)"b:", (char_u *)"changedtick", VAR_NUMBER,
+! numbuf, first);
+ }
+
+ /*
+ * List window variables.
+ */
+ static void
+! list_win_vars(first)
+! int *first;
+ {
+! list_hashtable_vars(&curwin->w_vars.dv_hashtab,
+! (char_u *)"w:", TRUE, first);
+ }
+
+ #ifdef FEAT_WINDOWS
+***************
+*** 1992,2000 ****
+ * List tab page variables.
+ */
+ static void
+! list_tab_vars()
+ {
+! list_hashtable_vars(&curtab->tp_vars.dv_hashtab, (char_u *)"t:", TRUE);
+ }
+ #endif
+
+--- 2000,2010 ----
+ * List tab page variables.
+ */
+ static void
+! list_tab_vars(first)
+! int *first;
+ {
+! list_hashtable_vars(&curtab->tp_vars.dv_hashtab,
+! (char_u *)"t:", TRUE, first);
+ }
+ #endif
+
+***************
+*** 2002,2040 ****
+ * List Vim variables.
+ */
+ static void
+! list_vim_vars()
+ {
+! list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE);
+ }
+
+ /*
+ * List script-local variables, if there is a script.
+ */
+ static void
+! list_script_vars()
+ {
+ if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
+! list_hashtable_vars(&SCRIPT_VARS(current_SID), (char_u *)"s:", FALSE);
+ }
+
+ /*
+ * List function variables, if there is a function.
+ */
+ static void
+! list_func_vars()
+ {
+ if (current_funccal != NULL)
+ list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab,
+! (char_u *)"l:", FALSE);
+ }
+
+ /*
+ * List variables in "arg".
+ */
+ static char_u *
+! list_arg_vars(eap, arg)
+ exarg_T *eap;
+ char_u *arg;
+ {
+ int error = FALSE;
+ int len;
+--- 2012,2055 ----
+ * List Vim variables.
+ */
+ static void
+! list_vim_vars(first)
+! int *first;
+ {
+! list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE, first);
+ }
+
+ /*
+ * List script-local variables, if there is a script.
+ */
+ static void
+! list_script_vars(first)
+! int *first;
+ {
+ if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
+! list_hashtable_vars(&SCRIPT_VARS(current_SID),
+! (char_u *)"s:", FALSE, first);
+ }
+
+ /*
+ * List function variables, if there is a function.
+ */
+ static void
+! list_func_vars(first)
+! int *first;
+ {
+ if (current_funccal != NULL)
+ list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab,
+! (char_u *)"l:", FALSE, first);
+ }
+
+ /*
+ * List variables in "arg".
+ */
+ static char_u *
+! list_arg_vars(eap, arg, first)
+ exarg_T *eap;
+ char_u *arg;
++ int *first;
+ {
+ int error = FALSE;
+ int len;
+***************
+*** 2091,2105 ****
+ {
+ switch (*name)
+ {
+! case 'g': list_glob_vars(); break;
+! case 'b': list_buf_vars(); break;
+! case 'w': list_win_vars(); break;
+ #ifdef FEAT_WINDOWS
+! case 't': list_tab_vars(); break;
+ #endif
+! case 'v': list_vim_vars(); break;
+! case 's': list_script_vars(); break;
+! case 'l': list_func_vars(); break;
+ default:
+ EMSG2(_("E738: Can't list variables for %s"), name);
+ }
+--- 2106,2120 ----
+ {
+ switch (*name)
+ {
+! case 'g': list_glob_vars(first); break;
+! case 'b': list_buf_vars(first); break;
+! case 'w': list_win_vars(first); break;
+ #ifdef FEAT_WINDOWS
+! case 't': list_tab_vars(first); break;
+ #endif
+! case 'v': list_vim_vars(first); break;
+! case 's': list_script_vars(first); break;
+! case 'l': list_func_vars(first); break;
+ default:
+ EMSG2(_("E738: Can't list variables for %s"), name);
+ }
+***************
+*** 2116,2122 ****
+ *arg = NUL;
+ list_one_var_a((char_u *)"",
+ arg == arg_subsc ? name : name_start,
+! tv.v_type, s == NULL ? (char_u *)"" : s);
+ *arg = c;
+ vim_free(tf);
+ }
+--- 2131,2139 ----
+ *arg = NUL;
+ list_one_var_a((char_u *)"",
+ arg == arg_subsc ? name : name_start,
+! tv.v_type,
+! s == NULL ? (char_u *)"" : s,
+! first);
+ *arg = c;
+ vim_free(tf);
+ }
+***************
+*** 18001,18009 ****
+ * List the value of one internal variable.
+ */
+ static void
+! list_one_var(v, prefix)
+ dictitem_T *v;
+ char_u *prefix;
+ {
+ char_u *tofree;
+ char_u *s;
+--- 18024,18033 ----
+ * List the value of one internal variable.
+ */
+ static void
+! list_one_var(v, prefix, first)
+ dictitem_T *v;
+ char_u *prefix;
++ int *first;
+ {
+ char_u *tofree;
+ char_u *s;
+***************
+*** 18011,18026 ****
+
+ s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
+ list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
+! s == NULL ? (char_u *)"" : s);
+ vim_free(tofree);
+ }
+
+ static void
+! list_one_var_a(prefix, name, type, string)
+ char_u *prefix;
+ char_u *name;
+ int type;
+ char_u *string;
+ {
+ /* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
+ msg_start();
+--- 18035,18051 ----
+
+ s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
+ list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
+! s == NULL ? (char_u *)"" : s, first);
+ vim_free(tofree);
+ }
+
+ static void
+! list_one_var_a(prefix, name, type, string, first)
+ char_u *prefix;
+ char_u *name;
+ int type;
+ char_u *string;
++ int *first; /* when TRUE clear rest of screen and set to FALSE */
+ {
+ /* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
+ msg_start();
+***************
+*** 18052,18057 ****
+--- 18077,18087 ----
+
+ if (type == VAR_FUNC)
+ msg_puts((char_u *)"()");
++ if (*first)
++ {
++ msg_clr_eos();
++ *first = FALSE;
++ }
+ }
+
+ /*
+*** ../vim-7.1.088/src/version.c Thu Aug 30 10:34:19 2007
+--- src/version.c Thu Aug 30 11:06:32 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 89,
+ /**/
+
+--
+Edison's greatest achievement came in 1879, when he invented the
+electric company. Edison's design was a brilliant adaptation of the
+simple electrical circuit: the electric company sends electricity
+through a wire to a customer, then immediately gets the electricity
+back through another wire
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.090
+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.1.090
+Problem: Compiler warning on Mac OS X 10.5.
+Solution: Don't redeclare sigaltstack(). (Hisashi T Fujinaka)
+Files: src/os_unix.c
+
+
+*** ../vim-7.1.089/src/os_unix.c Sat Aug 11 22:22:56 2007
+--- src/os_unix.c Wed Aug 22 22:28:48 2007
+***************
+*** 753,759 ****
+ if (signal_stack != NULL)
+ {
+ # ifdef HAVE_SIGALTSTACK
+! # ifdef __APPLE__
+ /* missing prototype. Adding it to osdef?.h.in doesn't work, because
+ * "struct sigaltstack" needs to be declared. */
+ extern int sigaltstack __ARGS((const struct sigaltstack *ss, struct sigaltstack *oss));
+--- 753,760 ----
+ if (signal_stack != NULL)
+ {
+ # ifdef HAVE_SIGALTSTACK
+! # if defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
+! || MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
+ /* missing prototype. Adding it to osdef?.h.in doesn't work, because
+ * "struct sigaltstack" needs to be declared. */
+ extern int sigaltstack __ARGS((const struct sigaltstack *ss, struct sigaltstack *oss));
+***************
+*** 5688,5694 ****
+
+ /*
+ * Closes connection to gpm
+! * returns non-zero if connection succesfully closed
+ */
+ static void
+ gpm_close()
+--- 5689,5695 ----
+
+ /*
+ * Closes connection to gpm
+! * returns non-zero if connection successfully closed
+ */
+ static void
+ gpm_close()
+*** ../vim-7.1.089/src/version.c Thu Aug 30 11:10:38 2007
+--- src/version.c Thu Aug 30 11:46:07 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 90,
+ /**/
+
+--
+ We're knights of the round table
+ We dance whene'er we're able
+ We do routines and chorus scenes
+ With footwork impeccable.
+ We dine well here in Camelot
+ We eat ham and jam and spam a lot.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.091 (extra)
+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.1.091 (extra)
+Problem: Win32: Can't embed Vim inside another application.
+Solution: Add the --windowid argument. (Nageshwar)
+Files: runtime/doc/gui_w32.txt, runtime/doc/starting.txt,
+ runtime/doc/vi_diff.txt, src/globals.h, src/gui_w32.c, src/main.c
+
+
+*** ../vim-7.1.090/runtime/doc/gui_w32.txt Sat May 12 15:35:53 2007
+--- runtime/doc/gui_w32.txt Tue Aug 14 17:32:27 2007
+***************
+*** 1,4 ****
+! *gui_w32.txt* For Vim version 7.1. Last change: 2007 May 03
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 52,57 ****
+--- 52,67 ----
+ *gui-w32s*
+ There is a specific version of gvim.exe that runs under the Win32s subsystem
+ of Windows 3.1 or 3.11. See |win32s|.
++
++
++ Using Vim as a plugin *gui-w32-windowid*
++
++ When gvim starts up normally, it creates its own top level window. If you
++ pass Vim the command-line option |--windowid| with a decimal or hexadecimal
++ value, Vim will create a window that is a child of the window with the given
++ ID. This enables Vim to act as a plugin in another application. This really
++ is a programmer's interface, and is of no use without a supporting application
++ to spawn Vim correctly.
+
+ ==============================================================================
+ 2. Vim as default editor *vim-default-editor*
+*** ../vim-7.1.090/runtime/doc/starting.txt Sat May 12 16:56:17 2007
+--- runtime/doc/starting.txt Tue Aug 14 17:34:22 2007
+***************
+*** 1,4 ****
+! *starting.txt* For Vim version 7.1. Last change: 2007 May 12
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *starting.txt* For Vim version 7.1. Last change: 2007 Aug 14
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 547,552 ****
+--- 547,557 ----
+ GTK+ GUI Vim only. Make gvim try to use GtkPlug mechanism, so
+ that it runs inside another window. See |gui-gtk-socketid|
+ for details. {not in Vi}
++
++ --windowid {id} *--windowid*
++ Win32 GUI Vim only. Make gvim try to use the window {id} as a
++ parent, so that it runs inside that window. See
++ |gui-w32-windowid| for details. {not in Vi}
+
+ --echo-wid *--echo-wid*
+ GTK+ GUI Vim only. Make gvim echo the Window ID on stdout,
+*** ../vim-7.1.090/runtime/doc/vi_diff.txt Sat May 12 14:54:28 2007
+--- runtime/doc/vi_diff.txt Tue Aug 14 17:35:10 2007
+***************
+*** 1,4 ****
+! *vi_diff.txt* For Vim version 7.1. Last change: 2007 May 07
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+--- 1,4 ----
+! *vi_diff.txt* For Vim version 7.1. Last change: 2007 Aug 14
+
+
+ VIM REFERENCE MANUAL by Bram Moolenaar
+***************
+*** 826,831 ****
+--- 826,833 ----
+ --servername {name} Vim: Specify Vim server name
+
+ --socketid {id} Vim: GTK window socket to run Vim in
++
++ --windowid {id} Vim: Win32 window ID to run Vim in
+
+ --version Vim: show version message and exit.
+
+*** ../vim-7.1.090/src/globals.h Thu May 10 19:26:02 2007
+--- src/globals.h Wed Aug 29 22:27:45 2007
+***************
+*** 876,882 ****
+ EXTERN int no_mapping INIT(= FALSE); /* currently no mapping allowed */
+ EXTERN int no_zero_mapping INIT(= 0); /* mapping zero not allowed */
+ EXTERN int allow_keys INIT(= FALSE); /* allow key codes when no_mapping
+! * is set */
+ EXTERN int no_u_sync INIT(= 0); /* Don't call u_sync() */
+
+ EXTERN int restart_edit INIT(= 0); /* call edit when next cmd finished */
+--- 876,882 ----
+ EXTERN int no_mapping INIT(= FALSE); /* currently no mapping allowed */
+ EXTERN int no_zero_mapping INIT(= 0); /* mapping zero not allowed */
+ EXTERN int allow_keys INIT(= FALSE); /* allow key codes when no_mapping
+! * is set */
+ EXTERN int no_u_sync INIT(= 0); /* Don't call u_sync() */
+
+ EXTERN int restart_edit INIT(= 0); /* call edit when next cmd finished */
+***************
+*** 1250,1255 ****
+--- 1250,1263 ----
+ #ifdef FEAT_GUI_GTK
+ EXTERN guint32 gtk_socket_id INIT(= 0);
+ EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
++ #endif
++
++ #ifdef FEAT_GUI_W32
++ /*
++ * The value of the --windowid argument.
++ * For embedding gvim inside another application.
++ */
++ EXTERN int win_socket_id INIT(= 0);
+ #endif
+
+ #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+*** ../vim-7.1.090/src/gui_w32.c Tue Aug 14 16:57:04 2007
+--- src/gui_w32.c Tue Aug 14 17:13:41 2007
+***************
+*** 23,28 ****
+--- 23,30 ----
+ * e.g., replace LONG with LONG_PTR, etc.
+ */
+
++ #include "vim.h"
++
+ /*
+ * These are new in Windows ME/XP, only defined in recent compilers.
+ */
+***************
+*** 1432,1447 ****
+ }
+ }
+ else
+! /* Open toplevel window. */
+ s_hwnd = CreateWindow(
+! szVimWndClass, "Vim MSWindows GUI",
+! WS_OVERLAPPEDWINDOW,
+! gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
+! gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y,
+! 100, /* Any value will do */
+! 100, /* Any value will do */
+! NULL, NULL,
+! s_hinst, NULL);
+
+ if (s_hwnd == NULL)
+ return FAIL;
+--- 1434,1462 ----
+ }
+ }
+ else
+! {
+! /* If the provided windowid is not valid reset it to zero, so that it
+! * is ignored and we open our own window. */
+! if (IsWindow((HWND)win_socket_id) <= 0)
+! win_socket_id = 0;
+!
+! /* Create a window. If win_socket_id is not zero without border and
+! * titlebar, it will be reparented below. */
+ s_hwnd = CreateWindow(
+! szVimWndClass, "Vim MSWindows GUI",
+! win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP,
+! gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
+! gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y,
+! 100, /* Any value will do */
+! 100, /* Any value will do */
+! NULL, NULL,
+! s_hinst, NULL);
+! if (s_hwnd != NULL && win_socket_id != 0)
+! {
+! SetParent(s_hwnd, (HWND)win_socket_id);
+! ShowWindow(s_hwnd, SW_SHOWMAXIMIZED);
+! }
+! }
+
+ if (s_hwnd == NULL)
+ return FAIL;
+*** ../vim-7.1.090/src/main.c Fri Aug 10 21:32:41 2007
+--- src/main.c Tue Aug 14 17:22:52 2007
+***************
+*** 275,280 ****
+--- 275,281 ----
+ * -display or --display
+ * --server...
+ * --socketid
++ * --windowid
+ */
+ early_arg_scan(¶ms);
+
+***************
+*** 1489,1495 ****
+ * Get the name of the display, before gui_prepare() removes it from
+ * argv[]. Used for the xterm-clipboard display.
+ *
+! * Also find the --server... arguments and --socketid
+ */
+ /*ARGSUSED*/
+ static void
+--- 1490,1496 ----
+ * Get the name of the display, before gui_prepare() removes it from
+ * argv[]. Used for the xterm-clipboard display.
+ *
+! * Also find the --server... arguments and --socketid and --windowid
+ */
+ /*ARGSUSED*/
+ static void
+***************
+*** 1536,1559 ****
+ # endif
+ }
+ # endif
+! # ifdef FEAT_GUI_GTK
+ else if (STRICMP(argv[i], "--socketid") == 0)
+ {
+! unsigned int socket_id;
+ int count;
+
+ if (i == argc - 1)
+ mainerr_arg_missing((char_u *)argv[i]);
+ if (STRNICMP(argv[i+1], "0x", 2) == 0)
+! count = sscanf(&(argv[i + 1][2]), "%x", &socket_id);
+ else
+! count = sscanf(argv[i+1], "%u", &socket_id);
+ if (count != 1)
+ mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
+ else
+! gtk_socket_id = socket_id;
+ i++;
+ }
+ else if (STRICMP(argv[i], "--echo-wid") == 0)
+ echo_wid_arg = TRUE;
+ # endif
+--- 1537,1571 ----
+ # endif
+ }
+ # endif
+!
+! # if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
+! # ifdef FEAT_GUI_W32
+! else if (STRICMP(argv[i], "--windowid") == 0)
+! # else
+ else if (STRICMP(argv[i], "--socketid") == 0)
++ # endif
+ {
+! unsigned int id;
+ int count;
+
+ if (i == argc - 1)
+ mainerr_arg_missing((char_u *)argv[i]);
+ if (STRNICMP(argv[i+1], "0x", 2) == 0)
+! count = sscanf(&(argv[i + 1][2]), "%x", &id);
+ else
+! count = sscanf(argv[i+1], "%u", &id);
+ if (count != 1)
+ mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
+ else
+! # ifdef FEAT_GUI_W32
+! win_socket_id = id;
+! # else
+! gtk_socket_id = id;
+! # endif
+ i++;
+ }
++ # endif
++ # ifdef FEAT_GUI_GTK
+ else if (STRICMP(argv[i], "--echo-wid") == 0)
+ echo_wid_arg = TRUE;
+ # endif
+***************
+*** 1683,1690 ****
+ }
+ }
+ #endif
+! #ifdef FEAT_GUI_GTK
+ else if (STRNICMP(argv[0] + argv_idx, "socketid", 8) == 0)
+ {
+ /* already processed -- snatch the following arg */
+ if (argc > 1)
+--- 1695,1706 ----
+ }
+ }
+ #endif
+! #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
+! # ifdef FEAT_GUI_GTK
+ else if (STRNICMP(argv[0] + argv_idx, "socketid", 8) == 0)
++ # else
++ else if (STRNICMP(argv[0] + argv_idx, "windowid", 8) == 0)
++ # endif
+ {
+ /* already processed -- snatch the following arg */
+ if (argc > 1)
+***************
+*** 1693,1698 ****
+--- 1709,1716 ----
+ ++argv;
+ }
+ }
++ #endif
++ #ifdef FEAT_GUI_GTK
+ else if (STRNICMP(argv[0] + argv_idx, "echo-wid", 8) == 0)
+ {
+ /* already processed, skip */
+***************
+*** 3120,3125 ****
+--- 3138,3144 ----
+ #endif
+ #ifdef FEAT_GUI_W32
+ main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
++ main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
+ #endif
+
+ #ifdef FEAT_GUI_GNOME
+*** ../vim-7.1.090/src/version.c Thu Aug 30 11:46:46 2007
+--- src/version.c Thu Aug 30 12:21:02 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 91,
+ /**/
+
+--
+ We're knights of the Round Table
+ Our shows are formidable
+ But many times
+ We're given rhymes
+ That are quite unsingable
+ We're opera mad in Camelot
+ We sing from the diaphragm a lot.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.092 (extra)
+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.1.092 (extra, after 7.1.088)
+Problem: Wrong arguments for MoveWindowStructure().
+Solution: Remove "TRUE". (Michael Henry)
+Files: src/gui_mac.c
+
+
+*** ../vim-7.1.091/src/gui_mac.c Thu Aug 30 10:34:19 2007
+--- src/gui_mac.c Thu Aug 30 12:48:41 2007
+***************
+*** 3149,3155 ****
+ /* TODO: Should make sure the window is move within range
+ * e.g.: y > ~16 [Menu bar], x > 0, x < screen width
+ */
+! MoveWindowStructure(gui.VimWindow, x, y, TRUE);
+ }
+
+ void
+--- 3149,3155 ----
+ /* TODO: Should make sure the window is move within range
+ * e.g.: y > ~16 [Menu bar], x > 0, x < screen width
+ */
+! MoveWindowStructure(gui.VimWindow, x, y);
+ }
+
+ void
+***************
+*** 5293,5299 ****
+ short itemType;
+ short useIcon;
+ short width;
+! short totalButtonWidth = 0; /* the width of all button together
+ including spacing */
+ short widestButton = 0;
+ short dfltButtonEdge = 20; /* gut feeling */
+--- 5293,5299 ----
+ short itemType;
+ short useIcon;
+ short width;
+! short totalButtonWidth = 0; /* the width of all buttons together
+ including spacing */
+ short widestButton = 0;
+ short dfltButtonEdge = 20; /* gut feeling */
+***************
+*** 5483,5489 ****
+ {
+
+ macMoveDialogItem(theDialog, button, buttonItm.box.left, buttonItm.box.top, &box);
+! /* With vertical, it's better to have all button the same lenght */
+ if (vertical)
+ {
+ macSizeDialogItem(theDialog, button, widestButton, 0);
+--- 5483,5489 ----
+ {
+
+ macMoveDialogItem(theDialog, button, buttonItm.box.left, buttonItm.box.top, &box);
+! /* With vertical, it's better to have all buttons the same length */
+ if (vertical)
+ {
+ macSizeDialogItem(theDialog, button, widestButton, 0);
+*** ../vim-7.1.091/src/version.c Thu Aug 30 12:24:21 2007
+--- src/version.c Thu Aug 30 12:47:24 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 92,
+ /**/
+
+--
+ In war we're tough and able.
+ Quite indefatigable
+ Between our quests
+ We sequin vests
+ And impersonate Clark Gable
+ It's a busy life in Camelot.
+ I have to push the pram a lot.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.093
+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.1.093
+Problem: Reading past end of a screen line when determining cell width.
+ (Dominique Pelle)
+Solution: Add an argument to mb_off2cells() for the maximum offset.
+Files: src/globals.h, src/gui.c, src/mbyte.c, src/proto/mbyte.pro,
+ src/screen.c
+
+
+*** ../vim-7.1.092/src/globals.h Thu Aug 30 12:24:21 2007
+--- src/globals.h Wed Aug 29 22:27:45 2007
+***************
+*** 801,807 ****
+ EXTERN int (*mb_char2bytes) __ARGS((int c, char_u *buf)) INIT(= latin_char2bytes);
+ EXTERN int (*mb_ptr2cells) __ARGS((char_u *p)) INIT(= latin_ptr2cells);
+ EXTERN int (*mb_char2cells) __ARGS((int c)) INIT(= latin_char2cells);
+! EXTERN int (*mb_off2cells) __ARGS((unsigned off)) INIT(= latin_off2cells);
+ EXTERN int (*mb_ptr2char) __ARGS((char_u *p)) INIT(= latin_ptr2char);
+ EXTERN int (*mb_head_off) __ARGS((char_u *base, char_u *p)) INIT(= latin_head_off);
+
+--- 801,807 ----
+ EXTERN int (*mb_char2bytes) __ARGS((int c, char_u *buf)) INIT(= latin_char2bytes);
+ EXTERN int (*mb_ptr2cells) __ARGS((char_u *p)) INIT(= latin_ptr2cells);
+ EXTERN int (*mb_char2cells) __ARGS((int c)) INIT(= latin_char2cells);
+! EXTERN int (*mb_off2cells) __ARGS((unsigned off, unsigned max_off)) INIT(= latin_off2cells);
+ EXTERN int (*mb_ptr2char) __ARGS((char_u *p)) INIT(= latin_ptr2char);
+ EXTERN int (*mb_head_off) __ARGS((char_u *base, char_u *p)) INIT(= latin_head_off);
+
+*** ../vim-7.1.092/src/gui.c Wed Aug 15 20:07:53 2007
+--- src/gui.c Wed Aug 29 22:16:51 2007
+***************
+*** 1080,1086 ****
+ cur_width = gui.char_width;
+ }
+ #ifdef FEAT_MBYTE
+! if (has_mbyte && (*mb_off2cells)(LineOffset[gui.row] + gui.col) > 1)
+ {
+ /* Double wide character. */
+ if (shape_table[idx].shape != SHAPE_VER)
+--- 1080,1087 ----
+ cur_width = gui.char_width;
+ }
+ #ifdef FEAT_MBYTE
+! if (has_mbyte && (*mb_off2cells)(LineOffset[gui.row] + gui.col,
+! LineOffset[gui.row] + screen_Columns) > 1)
+ {
+ /* Double wide character. */
+ if (shape_table[idx].shape != SHAPE_VER)
+***************
+*** 1159,1165 ****
+ #endif
+
+ # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_MAC))
+ if (gui_has_tabline())
+ text_area_y += gui.tabline_height;
+ #endif
+--- 1160,1166 ----
+ #endif
+
+ # if defined(FEAT_GUI_TABLINE) && (defined(FEAT_GUI_MSWIN) \
+! || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_MAC))
+ if (gui_has_tabline())
+ text_area_y += gui.tabline_height;
+ #endif
+*** ../vim-7.1.092/src/mbyte.c Sat Aug 11 13:57:31 2007
+--- src/mbyte.c Thu Aug 30 13:48:30 2007
+***************
+*** 1310,1329 ****
+ /*
+ * mb_off2cells() function pointer.
+ * Return number of display cells for char at ScreenLines[off].
+! * Caller must make sure "off" and "off + 1" are valid!
+ */
+ /*ARGSUSED*/
+ int
+! latin_off2cells(off)
+ unsigned off;
+ {
+ return 1;
+ }
+
+ int
+! dbcs_off2cells(off)
+ unsigned off;
+ {
+ /* Number of cells is equal to number of bytes, except for euc-jp when
+ * the first byte is 0x8e. */
+ if (enc_dbcs == DBCS_JPNU && ScreenLines[off] == 0x8e)
+--- 1310,1335 ----
+ /*
+ * mb_off2cells() function pointer.
+ * Return number of display cells for char at ScreenLines[off].
+! * We make sure that the offset used is less than "max_off".
+ */
+ /*ARGSUSED*/
+ int
+! latin_off2cells(off, max_off)
+ unsigned off;
++ unsigned max_off;
+ {
+ return 1;
+ }
+
+ int
+! dbcs_off2cells(off, max_off)
+ unsigned off;
++ unsigned max_off;
+ {
++ /* never check beyond end of the line */
++ if (off >= max_off)
++ return 1;
++
+ /* Number of cells is equal to number of bytes, except for euc-jp when
+ * the first byte is 0x8e. */
+ if (enc_dbcs == DBCS_JPNU && ScreenLines[off] == 0x8e)
+***************
+*** 1332,1341 ****
+ }
+
+ int
+! utf_off2cells(off)
+ unsigned off;
+ {
+! return ScreenLines[off + 1] == 0 ? 2 : 1;
+ }
+
+ /*
+--- 1338,1348 ----
+ }
+
+ int
+! utf_off2cells(off, max_off)
+ unsigned off;
++ unsigned max_off;
+ {
+! return (off + 1 < max_off && ScreenLines[off + 1] == 0) ? 2 : 1;
+ }
+
+ /*
+***************
+*** 2899,2910 ****
+ if (composing_hangul)
+ return TRUE;
+ #endif
+! if (enc_dbcs != 0)
+! return dbcs_off2cells(LineOffset[row] + col) > 1;
+! if (enc_utf8)
+! return (col + 1 < Columns
+! && ScreenLines[LineOffset[row] + col + 1] == 0);
+! return FALSE;
+ }
+
+ # if defined(FEAT_CLIPBOARD) || defined(FEAT_GUI) || defined(FEAT_RIGHTLEFT) \
+--- 2906,2913 ----
+ if (composing_hangul)
+ return TRUE;
+ #endif
+! return (*mb_off2cells)(LineOffset[row] + col,
+! LineOffset[row] + screen_Columns) > 1;
+ }
+
+ # if defined(FEAT_CLIPBOARD) || defined(FEAT_GUI) || defined(FEAT_RIGHTLEFT) \
+*** ../vim-7.1.092/src/proto/mbyte.pro Sat May 5 20:02:52 2007
+--- src/proto/mbyte.pro Wed Aug 29 20:49:02 2007
+***************
+*** 12,20 ****
+ int utf_ptr2cells __ARGS((char_u *p));
+ int dbcs_ptr2cells __ARGS((char_u *p));
+ int latin_char2cells __ARGS((int c));
+! int latin_off2cells __ARGS((unsigned off));
+! int dbcs_off2cells __ARGS((unsigned off));
+! int utf_off2cells __ARGS((unsigned off));
+ int latin_ptr2char __ARGS((char_u *p));
+ int utf_ptr2char __ARGS((char_u *p));
+ int mb_ptr2char_adv __ARGS((char_u **pp));
+--- 12,20 ----
+ int utf_ptr2cells __ARGS((char_u *p));
+ int dbcs_ptr2cells __ARGS((char_u *p));
+ int latin_char2cells __ARGS((int c));
+! int latin_off2cells __ARGS((unsigned off, unsigned max_off));
+! int dbcs_off2cells __ARGS((unsigned off, unsigned max_off));
+! int utf_off2cells __ARGS((unsigned off, unsigned max_off));
+ int latin_ptr2char __ARGS((char_u *p));
+ int utf_ptr2char __ARGS((char_u *p));
+ int mb_ptr2char_adv __ARGS((char_u **pp));
+*** ../vim-7.1.092/src/screen.c Sun Aug 5 20:10:16 2007
+--- src/screen.c Thu Aug 30 10:31:26 2007
+***************
+*** 1024,1030 ****
+ type = VALID;
+ }
+
+! /* Trick: we want to avoid clearning the screen twice. screenclear() will
+ * set "screen_cleared" to TRUE. The special value MAYBE (which is still
+ * non-zero and thus not FALSE) will indicate that screenclear() was not
+ * called. */
+--- 1024,1030 ----
+ type = VALID;
+ }
+
+! /* Trick: we want to avoid clearing the screen twice. screenclear() will
+ * set "screen_cleared" to TRUE. The special value MAYBE (which is still
+ * non-zero and thus not FALSE) will indicate that screenclear() was not
+ * called. */
+***************
+*** 4632,4638 ****
+
+ /*
+ * At end of screen line and there is more to come: Display the line
+! * so far. If there is no more to display it is catched above.
+ */
+ if ((
+ #ifdef FEAT_RIGHTLEFT
+--- 4632,4638 ----
+
+ /*
+ * At end of screen line and there is more to come: Display the line
+! * so far. If there is no more to display it is caught above.
+ */
+ if ((
+ #ifdef FEAT_RIGHTLEFT
+***************
+*** 4709,4717 ****
+ #endif
+ #ifdef FEAT_MBYTE
+ && !(has_mbyte
+! && ((*mb_off2cells)(LineOffset[screen_row]) == 2
+ || (*mb_off2cells)(LineOffset[screen_row - 1]
+! + (int)Columns - 2) == 2))
+ #endif
+ )
+ {
+--- 4709,4721 ----
+ #endif
+ #ifdef FEAT_MBYTE
+ && !(has_mbyte
+! && ((*mb_off2cells)(LineOffset[screen_row],
+! LineOffset[screen_row] + screen_Columns)
+! == 2
+ || (*mb_off2cells)(LineOffset[screen_row - 1]
+! + (int)Columns - 2,
+! LineOffset[screen_row] + screen_Columns)
+! == 2))
+ #endif
+ )
+ {
+***************
+*** 4871,4876 ****
+--- 4875,4884 ----
+ {
+ unsigned off_from;
+ unsigned off_to;
++ #ifdef FEAT_MBYTE
++ unsigned max_off_from;
++ unsigned max_off_to;
++ #endif
+ int col = 0;
+ #if defined(FEAT_GUI) || defined(UNIX) || defined(FEAT_VERTSPLIT)
+ int hl;
+***************
+*** 4897,4902 ****
+--- 4905,4914 ----
+
+ off_from = (unsigned)(current_ScreenLine - ScreenLines);
+ off_to = LineOffset[row] + coloff;
++ #ifdef FEAT_MBYTE
++ max_off_from = off_from + screen_Columns;
++ max_off_to = LineOffset[row] + screen_Columns;
++ #endif
+
+ #ifdef FEAT_RIGHTLEFT
+ if (rlflag)
+***************
+*** 4931,4937 ****
+ {
+ #ifdef FEAT_MBYTE
+ if (has_mbyte && (col + 1 < endcol))
+! char_cells = (*mb_off2cells)(off_from);
+ else
+ char_cells = 1;
+ #endif
+--- 4943,4949 ----
+ {
+ #ifdef FEAT_MBYTE
+ if (has_mbyte && (col + 1 < endcol))
+! char_cells = (*mb_off2cells)(off_from, max_off_from);
+ else
+ char_cells = 1;
+ #endif
+***************
+*** 5008,5014 ****
+ * ScreenLinesUC[] is sufficient. */
+ if (char_cells == 1
+ && col + 1 < endcol
+! && (*mb_off2cells)(off_to) > 1)
+ {
+ /* Writing a single-cell character over a double-cell
+ * character: need to redraw the next cell. */
+--- 5020,5026 ----
+ * ScreenLinesUC[] is sufficient. */
+ if (char_cells == 1
+ && col + 1 < endcol
+! && (*mb_off2cells)(off_to, max_off_to) > 1)
+ {
+ /* Writing a single-cell character over a double-cell
+ * character: need to redraw the next cell. */
+***************
+*** 5017,5024 ****
+ }
+ else if (char_cells == 2
+ && col + 2 < endcol
+! && (*mb_off2cells)(off_to) == 1
+! && (*mb_off2cells)(off_to + 1) > 1)
+ {
+ /* Writing the second half of a double-cell character over
+ * a double-cell character: need to redraw the second
+--- 5029,5036 ----
+ }
+ else if (char_cells == 2
+ && col + 2 < endcol
+! && (*mb_off2cells)(off_to, max_off_to) == 1
+! && (*mb_off2cells)(off_to + 1, max_off_to) > 1)
+ {
+ /* Writing the second half of a double-cell character over
+ * a double-cell character: need to redraw the second
+***************
+*** 5037,5046 ****
+ * char over the left halve of an existing one. */
+ if (has_mbyte && col + char_cells == endcol
+ && ((char_cells == 1
+! && (*mb_off2cells)(off_to) > 1)
+ || (char_cells == 2
+! && (*mb_off2cells)(off_to) == 1
+! && (*mb_off2cells)(off_to + 1) > 1)))
+ clear_next = TRUE;
+ #endif
+
+--- 5049,5058 ----
+ * char over the left halve of an existing one. */
+ if (has_mbyte && col + char_cells == endcol
+ && ((char_cells == 1
+! && (*mb_off2cells)(off_to, max_off_to) > 1)
+ || (char_cells == 2
+! && (*mb_off2cells)(off_to, max_off_to) == 1
+! && (*mb_off2cells)(off_to + 1, max_off_to) > 1)))
+ clear_next = TRUE;
+ #endif
+
+***************
+*** 5180,5189 ****
+ /* find previous character by counting from first
+ * column and get its width. */
+ unsigned off = LineOffset[row];
+
+ while (off < off_to)
+ {
+! prev_cells = (*mb_off2cells)(off);
+ off += prev_cells;
+ }
+ }
+--- 5192,5202 ----
+ /* find previous character by counting from first
+ * column and get its width. */
+ unsigned off = LineOffset[row];
++ unsigned max_off = LineOffset[row] + screen_Columns;
+
+ while (off < off_to)
+ {
+! prev_cells = (*mb_off2cells)(off, max_off);
+ off += prev_cells;
+ }
+ }
+***************
+*** 5369,5375 ****
+ static int skip_status_match_char __ARGS((expand_T *xp, char_u *s));
+
+ /*
+! * Get the lenght of an item as it will be shown in the status line.
+ */
+ static int
+ status_match_len(xp, s)
+--- 5382,5388 ----
+ static int skip_status_match_char __ARGS((expand_T *xp, char_u *s));
+
+ /*
+! * Get the length of an item as it will be shown in the status line.
+ */
+ static int
+ status_match_len(xp, s)
+***************
+*** 5435,5441 ****
+ int row;
+ char_u *buf;
+ int len;
+! int clen; /* lenght in screen cells */
+ int fillchar;
+ int attr;
+ int i;
+--- 5448,5454 ----
+ int row;
+ char_u *buf;
+ int len;
+! int clen; /* length in screen cells */
+ int fillchar;
+ int attr;
+ int i;
+***************
+*** 6187,6192 ****
+--- 6200,6206 ----
+ char_u *ptr = text;
+ int c;
+ #ifdef FEAT_MBYTE
++ unsigned max_off;
+ int mbyte_blen = 1;
+ int mbyte_cells = 1;
+ int u8c = 0;
+***************
+*** 6203,6208 ****
+--- 6217,6225 ----
+ return;
+
+ off = LineOffset[row] + col;
++ #ifdef FEAT_MBYTE
++ max_off = LineOffset[row] + screen_Columns;
++ #endif
+ while (col < screen_Columns
+ && (len < 0 || (int)(ptr - text) < len)
+ && *ptr != NUL)
+***************
+*** 6326,6344 ****
+ else if (has_mbyte
+ && (len < 0 ? ptr[mbyte_blen] == NUL
+ : ptr + mbyte_blen >= text + len)
+! && ((mbyte_cells == 1 && (*mb_off2cells)(off) > 1)
+ || (mbyte_cells == 2
+! && (*mb_off2cells)(off) == 1
+! && (*mb_off2cells)(off + 1) > 1)))
+ clear_next_cell = TRUE;
+
+ /* Make sure we never leave a second byte of a double-byte behind,
+ * it confuses mb_off2cells(). */
+ if (enc_dbcs
+! && ((mbyte_cells == 1 && (*mb_off2cells)(off) > 1)
+ || (mbyte_cells == 2
+! && (*mb_off2cells)(off) == 1
+! && (*mb_off2cells)(off + 1) > 1)))
+ ScreenLines[off + mbyte_blen] = 0;
+ #endif
+ ScreenLines[off] = c;
+--- 6343,6361 ----
+ else if (has_mbyte
+ && (len < 0 ? ptr[mbyte_blen] == NUL
+ : ptr + mbyte_blen >= text + len)
+! && ((mbyte_cells == 1 && (*mb_off2cells)(off, max_off) > 1)
+ || (mbyte_cells == 2
+! && (*mb_off2cells)(off, max_off) == 1
+! && (*mb_off2cells)(off + 1, max_off) > 1)))
+ clear_next_cell = TRUE;
+
+ /* Make sure we never leave a second byte of a double-byte behind,
+ * it confuses mb_off2cells(). */
+ if (enc_dbcs
+! && ((mbyte_cells == 1 && (*mb_off2cells)(off, max_off) > 1)
+ || (mbyte_cells == 2
+! && (*mb_off2cells)(off, max_off) == 1
+! && (*mb_off2cells)(off + 1, max_off) > 1)))
+ ScreenLines[off + mbyte_blen] = 0;
+ #endif
+ ScreenLines[off] = c;
+***************
+*** 6924,6929 ****
+--- 6941,6949 ----
+ {
+ int r, c;
+ int off;
++ #ifdef FEAT_MBYTE
++ int max_off;
++ #endif
+
+ /* Can't use ScreenLines unless initialized */
+ if (ScreenLines == NULL)
+***************
+*** 6934,6943 ****
+ for (r = row; r < row + height; ++r)
+ {
+ off = LineOffset[r];
+ for (c = col; c < col + width; ++c)
+ {
+ #ifdef FEAT_MBYTE
+! if (enc_dbcs != 0 && dbcs_off2cells(off + c) > 1)
+ {
+ screen_char_2(off + c, r, c);
+ ++c;
+--- 6954,6966 ----
+ for (r = row; r < row + height; ++r)
+ {
+ off = LineOffset[r];
++ #ifdef FEAT_MBYTE
++ max_off = off + screen_Columns;
++ #endif
+ for (c = col; c < col + width; ++c)
+ {
+ #ifdef FEAT_MBYTE
+! if (enc_dbcs != 0 && dbcs_off2cells(off + c, max_off) > 1)
+ {
+ screen_char_2(off + c, r, c);
+ ++c;
+***************
+*** 6947,6953 ****
+ {
+ screen_char(off + c, r, c);
+ #ifdef FEAT_MBYTE
+! if (utf_off2cells(off + c) > 1)
+ ++c;
+ #endif
+ }
+--- 6970,6976 ----
+ {
+ screen_char(off + c, r, c);
+ #ifdef FEAT_MBYTE
+! if (utf_off2cells(off + c, max_off) > 1)
+ ++c;
+ #endif
+ }
+*** ../vim-7.1.092/src/version.c Thu Aug 30 12:50:00 2007
+--- src/version.c Thu Aug 30 13:45:25 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 93,
+ /**/
+
+--
+There is a fine line between courage and foolishness.
+Unfortunately, it's not a fence.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.094
+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.1.094
+Problem: When checking if syntax highlighting is present, looking in the
+ current buffer instead of the specified one.
+Solution: Use "buf" instead of "curbuf".
+Files: src/syntax.c
+
+
+*** ../vim-7.1.093/src/syntax.c Tue Aug 21 17:29:04 2007
+--- src/syntax.c Wed Aug 29 23:27:52 2007
+***************
+*** 5987,5994 ****
+ {
+ return (buf->b_syn_patterns.ga_len != 0
+ || buf->b_syn_clusters.ga_len != 0
+! || curbuf->b_keywtab.ht_used > 0
+! || curbuf->b_keywtab_ic.ht_used > 0);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+--- 5987,5994 ----
+ {
+ return (buf->b_syn_patterns.ga_len != 0
+ || buf->b_syn_clusters.ga_len != 0
+! || buf->b_keywtab.ht_used > 0
+! || buf->b_keywtab_ic.ht_used > 0);
+ }
+
+ #if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+*** ../vim-7.1.093/src/version.c Thu Aug 30 13:51:52 2007
+--- src/version.c Thu Aug 30 19:35:52 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 94,
+ /**/
+
+--
+MAN: You don't frighten us, English pig-dog! Go and boil your bottoms,
+ son of a silly person. I blow my nose on you, so-called Arthur-king,
+ you and your silly English K...kaniggets.
+ He puts hands to his ears and blows a raspberry.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.095
+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.1.095
+Problem: The FocusLost and FocusGained autocommands are triggered
+ asynchronously in the GUI. This may cause arbitrary problems.
+Solution: Put the focus event in the input buffer and handle it when ready
+ for it.
+Files: src/eval.c, src/getchar.c, src/gui.c, src/gui_gtk_x11.c,
+ src/keymap.h
+
+
+*** ../vim-7.1.094/src/eval.c Thu Aug 30 11:10:38 2007
+--- src/eval.c Mon Sep 3 22:48:09 2007
+***************
+*** 9912,9929 ****
+
+ ++no_mapping;
+ ++allow_keys;
+! if (argvars[0].v_type == VAR_UNKNOWN)
+! /* getchar(): blocking wait. */
+! n = safe_vgetc();
+! else if (get_tv_number_chk(&argvars[0], &error) == 1)
+! /* getchar(1): only check if char avail */
+! n = vpeekc();
+! else if (error || vpeekc() == NUL)
+! /* illegal argument or getchar(0) and no char avail: return zero */
+! n = 0;
+! else
+! /* getchar(0) and char avail: return char */
+! n = safe_vgetc();
+ --no_mapping;
+ --allow_keys;
+
+--- 9912,9935 ----
+
+ ++no_mapping;
+ ++allow_keys;
+! for (;;)
+! {
+! if (argvars[0].v_type == VAR_UNKNOWN)
+! /* getchar(): blocking wait. */
+! n = safe_vgetc();
+! else if (get_tv_number_chk(&argvars[0], &error) == 1)
+! /* getchar(1): only check if char avail */
+! n = vpeekc();
+! else if (error || vpeekc() == NUL)
+! /* illegal argument or getchar(0) and no char avail: return zero */
+! n = 0;
+! else
+! /* getchar(0) and char avail: return char */
+! n = safe_vgetc();
+! if (n == K_IGNORE)
+! continue;
+! break;
+! }
+ --no_mapping;
+ --allow_keys;
+
+*** ../vim-7.1.094/src/getchar.c Thu May 10 18:43:02 2007
+--- src/getchar.c Wed Aug 29 22:38:49 2007
+***************
+*** 1596,1603 ****
+ continue;
+ }
+ #endif
+-
+ #ifdef FEAT_GUI
+ /* Translate K_CSI to CSI. The special key is only used to avoid
+ * it being recognized as the start of a special key. */
+ if (c == K_CSI)
+--- 1596,1610 ----
+ continue;
+ }
+ #endif
+ #ifdef FEAT_GUI
++ /* The caller doesn't need to know that the focus event is delayed
++ * until getting a character. */
++ if (c == K_FOCUSGAINED || c == K_FOCUSLOST)
++ {
++ ui_focus_change(c == K_FOCUSGAINED);
++ continue;
++ }
++
+ /* Translate K_CSI to CSI. The special key is only used to avoid
+ * it being recognized as the start of a special key. */
+ if (c == K_CSI)
+*** ../vim-7.1.094/src/gui.c Thu Aug 30 13:51:52 2007
+--- src/gui.c Thu Aug 30 14:10:48 2007
+***************
+*** 4519,4525 ****
+ xim_set_focus(in_focus);
+ # endif
+
+! ui_focus_change(in_focus);
+ #endif
+ }
+
+--- 4519,4536 ----
+ xim_set_focus(in_focus);
+ # endif
+
+! /* Put events in the input queue only when allowed.
+! * ui_focus_change() isn't called directly, because it invokes
+! * autocommands and that must not happen asynchronously. */
+! if (!hold_gui_events)
+! {
+! char_u bytes[3];
+!
+! bytes[0] = CSI;
+! bytes[1] = KS_EXTRA;
+! bytes[2] = in_focus ? (int)KE_FOCUSGAINED : (int)KE_FOCUSLOST;
+! add_to_input_buf(bytes, 3);
+! }
+ #endif
+ }
+
+*** ../vim-7.1.094/src/gui_gtk_x11.c Tue Jun 19 18:07:52 2007
+--- src/gui_gtk_x11.c Wed Aug 29 22:43:34 2007
+***************
+*** 813,822 ****
+ if (blink_state == BLINK_NONE)
+ gui_mch_start_blink();
+
+! /* make sure keyboard input goes to the draw area (if this is focus for a window) */
+ if (widget != gui.drawarea)
+ gtk_widget_grab_focus(gui.drawarea);
+
+ return TRUE;
+ }
+
+--- 813,827 ----
+ if (blink_state == BLINK_NONE)
+ gui_mch_start_blink();
+
+! /* make sure keyboard input goes to the draw area (if this is focus for a
+! * window) */
+ if (widget != gui.drawarea)
+ gtk_widget_grab_focus(gui.drawarea);
+
++ /* make sure the input buffer is read */
++ if (gtk_main_level() > 0)
++ gtk_main_quit();
++
+ return TRUE;
+ }
+
+***************
+*** 828,833 ****
+--- 833,842 ----
+
+ if (blink_state != BLINK_NONE)
+ gui_mch_stop_blink();
++
++ /* make sure the input buffer is read */
++ if (gtk_main_level() > 0)
++ gtk_main_quit();
+
+ return TRUE;
+ }
+*** ../vim-7.1.094/src/keymap.h Sat May 5 19:34:22 2007
+--- src/keymap.h Wed Aug 29 22:17:51 2007
+***************
+*** 254,259 ****
+--- 254,261 ----
+ , KE_DROP /* DnD data is available */
+ , KE_CURSORHOLD /* CursorHold event */
+ , KE_NOP /* doesn't do something */
++ , KE_FOCUSGAINED /* focus gained */
++ , KE_FOCUSLOST /* focus lost */
+ };
+
+ /*
+***************
+*** 445,450 ****
+--- 447,454 ----
+ #define K_CMDWIN TERMCAP2KEY(KS_EXTRA, KE_CMDWIN)
+
+ #define K_DROP TERMCAP2KEY(KS_EXTRA, KE_DROP)
++ #define K_FOCUSGAINED TERMCAP2KEY(KS_EXTRA, KE_FOCUSGAINED)
++ #define K_FOCUSLOST TERMCAP2KEY(KS_EXTRA, KE_FOCUSLOST)
+
+ #define K_CURSORHOLD TERMCAP2KEY(KS_EXTRA, KE_CURSORHOLD)
+
+*** ../vim-7.1.094/src/version.c Thu Aug 30 19:36:52 2007
+--- src/version.c Wed Sep 5 21:42:41 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 95,
+ /**/
+
+--
+ARTHUR: Who are you?
+TALL KNIGHT: We are the Knights Who Say "Ni"!
+BEDEVERE: No! Not the Knights Who Say "Ni"!
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.096
+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.1.096
+Problem: Reading past end of a string when resizing Vim. (Dominique Pelle)
+Solution: Check the string pointer before getting the char it points to.
+Files: src/message.c
+
+
+*** ../vim-7.1.095/src/message.c Tue Aug 7 21:59:26 2007
+--- src/message.c Thu Aug 30 22:53:03 2007
+***************
+*** 944,949 ****
+--- 944,950 ----
+ c = K_IGNORE;
+ }
+ #endif
++
+ /*
+ * Allow scrolling back in the messages.
+ * Also accept scroll-down commands when messages fill the screen,
+***************
+*** 1840,1845 ****
+--- 1841,1847 ----
+ char_u *sb_str = str;
+ int sb_col = msg_col;
+ int wrap;
++ int did_last_char;
+
+ did_wait_return = FALSE;
+ while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL)
+***************
+*** 1909,1915 ****
+--- 1911,1920 ----
+ else
+ #endif
+ msg_screen_putchar(*s++, attr);
++ did_last_char = TRUE;
+ }
++ else
++ did_last_char = FALSE;
+
+ if (p_more)
+ /* store text for scrolling back */
+***************
+*** 1944,1954 ****
+
+ /* When we displayed a char in last column need to check if there
+ * is still more. */
+! if (*s >= ' '
+! #ifdef FEAT_RIGHTLEFT
+! && !cmdmsg_rl
+! #endif
+! )
+ continue;
+ }
+
+--- 1949,1955 ----
+
+ /* When we displayed a char in last column need to check if there
+ * is still more. */
+! if (did_last_char)
+ continue;
+ }
+
+*** ../vim-7.1.095/src/version.c Wed Sep 5 21:45:54 2007
+--- src/version.c Thu Sep 6 12:31:28 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 96,
+ /**/
+
+--
+Yah, well, we had to carve our electrons out of driftwood we'd
+find. In the winter. Uphill. Both ways.
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.097
+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.1.097
+Problem: ":setlocal stl=%!1+1" does not work.
+Solution: Adjust check for pointer. (Politz)
+Files: src/option.c
+
+
+*** ../vim-7.1.096/src/option.c Sun Aug 12 15:50:26 2007
+--- src/option.c Wed Sep 5 22:34:27 2007
+***************
+*** 6348,6354 ****
+ errmsg = check_stl_option(p_ruf);
+ }
+ /* check 'statusline' only if it doesn't start with "%!" */
+! else if (varp != &p_stl || s[0] != '%' || s[1] != '!')
+ errmsg = check_stl_option(s);
+ if (varp == &p_ruf && errmsg == NULL)
+ comp_col();
+--- 6352,6358 ----
+ errmsg = check_stl_option(p_ruf);
+ }
+ /* check 'statusline' only if it doesn't start with "%!" */
+! else if (varp == &p_ruf || s[0] != '%' || s[1] != '!')
+ errmsg = check_stl_option(s);
+ if (varp == &p_ruf && errmsg == NULL)
+ comp_col();
+*** ../vim-7.1.096/src/version.c Thu Sep 6 12:53:59 2007
+--- src/version.c Thu Sep 6 13:31:37 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 97,
+ /**/
+
+--
+Not too long ago, cut and paste was done with scissors and glue...
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.098
+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.1.098
+Problem: ":call s:var()" doesn't work if "s:var" is a Funcref. (Andy Wokula)
+Solution: Before converting "s:" into a script ID, check if it is a Funcref.
+Files: src/eval.c
+
+
+*** ../vim-7.1.097/src/eval.c Wed Sep 5 21:45:54 2007
+--- src/eval.c Thu Sep 6 12:11:19 2007
+***************
+*** 19367,19372 ****
+--- 19367,19394 ----
+ if (lv.ll_name == NULL)
+ {
+ /* Error found, but continue after the function name. */
++ *pp = end;
++ goto theend;
++ }
++
++ /* Check if the name is a Funcref. If so, use the value. */
++ if (lv.ll_exp_name != NULL)
++ {
++ len = (int)STRLEN(lv.ll_exp_name);
++ name = deref_func_name(lv.ll_exp_name, &len);
++ if (name == lv.ll_exp_name)
++ name = NULL;
++ }
++ else
++ {
++ len = (int)(end - *pp);
++ name = deref_func_name(*pp, &len);
++ if (name == *pp)
++ name = NULL;
++ }
++ if (name != NULL)
++ {
++ name = vim_strsave(name);
+ *pp = end;
+ goto theend;
+ }
+*** ../vim-7.1.097/src/version.c Thu Sep 6 13:32:53 2007
+--- src/version.c Thu Sep 6 14:24:10 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 98,
+ /**/
+
+--
+Not too long ago, a program was something you watched on TV...
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.099
+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.1.099
+Problem: When the 'keymap' and 'paste' options have a non-default value,
+ ":mkexrc" and ":mksession" do not correctly set the options.
+Solution: Set the options with side effects before other options.
+Files: src/option.c
+
+
+*** ../vim-7.1.098/src/option.c Thu Sep 6 13:32:53 2007
+--- src/option.c Wed Sep 5 22:34:27 2007
+***************
+*** 427,432 ****
+--- 427,434 ----
+ #define P_NOGLOB 0x100000L/* do not use local value for global vimrc */
+ #define P_NFNAME 0x200000L/* only normal file name chars allowed */
+ #define P_INSECURE 0x400000L/* option was set from a modeline */
++ #define P_PRI_MKRC 0x800000L/* priority for :mkvimrc (setting option has
++ side effects) */
+
+ #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
+
+***************
+*** 773,778 ****
+--- 775,782 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ },
++ /* P_PRI_MKRC isn't needed here, optval_default()
++ * always returns TRUE for 'compatible' */
+ {"compatible", "cp", P_BOOL|P_RALL,
+ (char_u *)&p_cp, PV_NONE,
+ {(char_u *)TRUE, (char_u *)FALSE}},
+***************
+*** 1515,1521 ****
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ },
+! {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME,
+ #ifdef FEAT_KEYMAP
+ (char_u *)&p_keymap, PV_KMAP,
+ {(char_u *)"", (char_u *)0L}
+--- 1519,1525 ----
+ {(char_u *)0L, (char_u *)0L}
+ #endif
+ },
+! {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC,
+ #ifdef FEAT_KEYMAP
+ (char_u *)&p_keymap, PV_KMAP,
+ {(char_u *)"", (char_u *)0L}
+***************
+*** 1836,1842 ****
+ {"paragraphs", "para", P_STRING|P_VI_DEF,
+ (char_u *)&p_para, PV_NONE,
+ {(char_u *)"IPLPPPQPP LIpplpipbp", (char_u *)0L}},
+! {"paste", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_paste, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}},
+ {"pastetoggle", "pt", P_STRING|P_VI_DEF,
+--- 1840,1846 ----
+ {"paragraphs", "para", P_STRING|P_VI_DEF,
+ (char_u *)&p_para, PV_NONE,
+ {(char_u *)"IPLPPPQPP LIpplpipbp", (char_u *)0L}},
+! {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC,
+ (char_u *)&p_paste, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}},
+ {"pastetoggle", "pt", P_STRING|P_VI_DEF,
+***************
+*** 8535,8547 ****
+ char_u *varp_local = NULL; /* fresh value */
+ char *cmd;
+ int round;
+
+ /*
+ * The options that don't have a default (terminal name, columns, lines)
+ * are never written. Terminal options are also not written.
+ */
+! for (p = &options[0]; !istermoption(p); p++)
+! if (!(p->flags & P_NO_MKRC) && !istermoption(p))
+ {
+ /* skip global option when only doing locals */
+ if (p->indir == PV_NONE && !(opt_flags & OPT_GLOBAL))
+--- 8539,8558 ----
+ char_u *varp_local = NULL; /* fresh value */
+ char *cmd;
+ int round;
++ int pri;
+
+ /*
+ * The options that don't have a default (terminal name, columns, lines)
+ * are never written. Terminal options are also not written.
++ * Do the loop over "options[]" twice: once for options with the
++ * P_PRI_MKRC flag and once without.
+ */
+! for (pri = 1; pri >= 0; --pri)
+! {
+! for (p = &options[0]; !istermoption(p); p++)
+! if (!(p->flags & P_NO_MKRC)
+! && !istermoption(p)
+! && ((pri == 1) == ((p->flags & P_PRI_MKRC) != 0)))
+ {
+ /* skip global option when only doing locals */
+ if (p->indir == PV_NONE && !(opt_flags & OPT_GLOBAL))
+***************
+*** 8637,8642 ****
+--- 8648,8654 ----
+ }
+ }
+ }
++ }
+ return OK;
+ }
+
+*** ../vim-7.1.098/src/version.c Thu Sep 6 14:25:50 2007
+--- src/version.c Thu Sep 6 16:32:31 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 99,
+ /**/
+
+--
+Not too long ago, a keyboard was something to make music with...
+
+ /// 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 ///
--- /dev/null
+To: vim-dev@vim.org
+Subject: patch 7.1.100
+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.1.100
+Problem: Win32: Executing cscope doesn't always work properly.
+Solution: Use another way to invoke cscope. (Mike Williams)
+Files: src/if_cscope.c, src/if_cscope.h, src/main.c,
+ src/proto/if_cscope.pro
+
+
+*** ../vim-7.1.099/src/if_cscope.c Tue Aug 21 18:02:58 2007
+--- src/if_cscope.c Sun Sep 2 16:50:50 2007
+***************
+*** 24,34 ****
+ /* not UNIX, must be WIN32 */
+ # include "vimio.h"
+ # include <fcntl.h>
+- # include <process.h>
+- # define STDIN_FILENO 0
+- # define STDOUT_FILENO 1
+- # define STDERR_FILENO 2
+- # define pipe(fds) _pipe(fds, 256, O_TEXT|O_NOINHERIT)
+ #endif
+ #include "if_cscope.h"
+
+--- 24,29 ----
+***************
+*** 65,71 ****
+ static char * cs_parse_results __ARGS((int cnumber, char *buf, int bufsize, char **context, char **linenumber, char **search));
+ static char * cs_pathcomponents __ARGS((char *path));
+ static void cs_print_tags_priv __ARGS((char **, char **, int));
+! static int cs_read_prompt __ARGS((int ));
+ static void cs_release_csp __ARGS((int, int freefnpp));
+ static int cs_reset __ARGS((exarg_T *eap));
+ static char * cs_resolve_file __ARGS((int, char *));
+--- 60,66 ----
+ static char * cs_parse_results __ARGS((int cnumber, char *buf, int bufsize, char **context, char **linenumber, char **search));
+ static char * cs_pathcomponents __ARGS((char *path));
+ static void cs_print_tags_priv __ARGS((char **, char **, int));
+! static int cs_read_prompt __ARGS((int));
+ static void cs_release_csp __ARGS((int, int freefnpp));
+ static int cs_reset __ARGS((exarg_T *eap));
+ static char * cs_resolve_file __ARGS((int, char *));
+***************
+*** 504,510 ****
+ #if defined(UNIX)
+ else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode))
+ #else
+! /* substitute define S_ISREG from os_unix.h */
+ else if (((statbuf.st_mode) & S_IFMT) == S_IFREG)
+ #endif
+ {
+--- 499,505 ----
+ #if defined(UNIX)
+ else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode))
+ #else
+! /* WIN32 - substitute define S_ISREG from os_unix.h */
+ else if (((statbuf.st_mode) & S_IFMT) == S_IFREG)
+ #endif
+ {
+***************
+*** 717,733 ****
+ cs_create_connection(i)
+ int i;
+ {
+! int to_cs[2], from_cs[2], len;
+! char *prog, *cmd, *ppath = NULL;
+! #ifndef UNIX
+! int in_save, out_save, err_save;
+! long_i ph;
+! # ifdef FEAT_GUI
+! HWND activewnd = NULL;
+! HWND consolewnd = NULL;
+! # endif
+ #endif
+
+ /*
+ * Cscope reads from to_cs[0] and writes to from_cs[1]; vi reads from
+ * from_cs[0] and writes to to_cs[1].
+--- 712,734 ----
+ cs_create_connection(i)
+ int i;
+ {
+! #ifdef UNIX
+! int to_cs[2], from_cs[2];
+! #endif
+! int len;
+! char *prog, *cmd, *ppath = NULL;
+! #ifdef WIN32
+! int fd;
+! SECURITY_ATTRIBUTES sa;
+! PROCESS_INFORMATION pi;
+! STARTUPINFO si;
+! BOOL pipe_stdin = FALSE, pipe_stdout = FALSE;
+! HANDLE stdin_rd, stdout_rd;
+! HANDLE stdout_wr, stdin_wr;
+! BOOL created;
+ #endif
+
++ #if defined(UNIX)
+ /*
+ * Cscope reads from to_cs[0] and writes to from_cs[1]; vi reads from
+ * from_cs[0] and writes to to_cs[1].
+***************
+*** 748,765 ****
+ return CSCOPE_FAILURE;
+ }
+
+- #if defined(UNIX)
+ switch (csinfo[i].pid = fork())
+ {
+ case -1:
+ (void)EMSG(_("E622: Could not fork for cscope"));
+ goto err_closing;
+ case 0: /* child: run cscope. */
+- #else
+- in_save = dup(STDIN_FILENO);
+- out_save = dup(STDOUT_FILENO);
+- err_save = dup(STDERR_FILENO);
+- #endif
+ if (dup2(to_cs[0], STDIN_FILENO) == -1)
+ PERROR("cs_create_connection 1");
+ if (dup2(from_cs[1], STDOUT_FILENO) == -1)
+--- 749,760 ----
+***************
+*** 768,782 ****
+ PERROR("cs_create_connection 3");
+
+ /* close unused */
+- #if defined(UNIX)
+ (void)close(to_cs[1]);
+ (void)close(from_cs[0]);
+ #else
+! /* On win32 we must close opposite ends because we are the parent */
+! (void)close(to_cs[0]);
+! to_cs[0] = -1;
+! (void)close(from_cs[1]);
+! from_cs[1] = -1;
+ #endif
+ /* expand the cscope exec for env var's */
+ if ((prog = (char *)alloc(MAXPATHL + 1)) == NULL)
+--- 763,794 ----
+ PERROR("cs_create_connection 3");
+
+ /* close unused */
+ (void)close(to_cs[1]);
+ (void)close(from_cs[0]);
+ #else
+! /* WIN32 */
+! /* Create pipes to communicate with cscope */
+! sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+! sa.bInheritHandle = TRUE;
+! sa.lpSecurityDescriptor = NULL;
+!
+! if (!(pipe_stdin = CreatePipe(&stdin_rd, &stdin_wr, &sa, 0))
+! || !(pipe_stdout = CreatePipe(&stdout_rd, &stdout_wr, &sa, 0)))
+! {
+! (void)EMSG(_("E566: Could not create cscope pipes"));
+! err_closing:
+! if (pipe_stdin)
+! {
+! CloseHandle(stdin_rd);
+! CloseHandle(stdin_wr);
+! }
+! if (pipe_stdout)
+! {
+! CloseHandle(stdout_rd);
+! CloseHandle(stdout_wr);
+! }
+! return CSCOPE_FAILURE;
+! }
+ #endif
+ /* expand the cscope exec for env var's */
+ if ((prog = (char *)alloc(MAXPATHL + 1)) == NULL)
+***************
+*** 784,789 ****
+--- 796,802 ----
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
++ /* WIN32 */
+ goto err_closing;
+ #endif
+ }
+***************
+*** 800,805 ****
+--- 813,819 ----
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
++ /* WIN32 */
+ goto err_closing;
+ #endif
+ }
+***************
+*** 818,823 ****
+--- 832,838 ----
+ #ifdef UNIX
+ return CSCOPE_FAILURE;
+ #else
++ /* WIN32 */
+ goto err_closing;
+ #endif
+ }
+***************
+*** 826,831 ****
+--- 841,847 ----
+ #if defined(UNIX)
+ (void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname);
+ #else
++ /* WIN32 */
+ (void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname);
+ #endif
+ if (csinfo[i].ppath != NULL)
+***************
+*** 851,910 ****
+ exit(127);
+ /* NOTREACHED */
+ default: /* parent. */
+- #else
+- # ifdef FEAT_GUI
+- activewnd = GetForegroundWindow(); /* on win9x cscope steals focus */
+- /* Dirty hack to hide annoying console window */
+- if (AllocConsole())
+- {
+- char *title;
+- title = (char *)alloc(1024);
+- if (title == NULL)
+- FreeConsole();
+- else
+- {
+- GetConsoleTitle(title, 1024); /* save for future restore */
+- SetConsoleTitle(
+- "GVIMCS{5499421B-CBEF-45b0-85EF-38167FDEA5C5}GVIMCS");
+- Sleep(40); /* as stated in MS KB we must wait 40 ms */
+- consolewnd = FindWindow(NULL,
+- "GVIMCS{5499421B-CBEF-45b0-85EF-38167FDEA5C5}GVIMCS");
+- if (consolewnd != NULL)
+- ShowWindow(consolewnd, SW_HIDE);
+- SetConsoleTitle(title);
+- vim_free(title);
+- }
+- }
+- # endif
+- /* May be use &shell, &shellquote etc */
+- # ifdef __BORLANDC__
+- /* BCC 5.5 uses a different function name for spawnlp */
+- ph = (long_i)spawnlp(P_NOWAIT, prog, cmd, NULL);
+- # else
+- ph = (long_i)_spawnlp(_P_NOWAIT, prog, cmd, NULL);
+- # endif
+- vim_free(prog);
+- vim_free(cmd);
+- # ifdef FEAT_GUI
+- /* Dirty hack part two */
+- if (activewnd != NULL)
+- /* restoring focus */
+- SetForegroundWindow(activewnd);
+- if (consolewnd != NULL)
+- FreeConsole();
+-
+- # endif
+- if (ph == -1)
+- {
+- PERROR(_("cs_create_connection exec failed"));
+- (void)EMSG(_("E623: Could not spawn cscope process"));
+- goto err_closing;
+- }
+- /* else */
+- csinfo[i].pid = 0;
+- csinfo[i].hProc = (HANDLE)ph;
+-
+- #endif /* !UNIX */
+ /*
+ * Save the file descriptors for later duplication, and
+ * reopen as streams.
+--- 867,872 ----
+***************
+*** 914,935 ****
+ if ((csinfo[i].fr_fp = fdopen(from_cs[0], "r")) == NULL)
+ PERROR(_("cs_create_connection: fdopen for fr_fp failed"));
+
+- #if defined(UNIX)
+ /* close unused */
+ (void)close(to_cs[0]);
+ (void)close(from_cs[1]);
+
+ break;
+ }
+ #else
+! /* restore stdhandles */
+! dup2(in_save, STDIN_FILENO);
+! dup2(out_save, STDOUT_FILENO);
+! dup2(err_save, STDERR_FILENO);
+! close(in_save);
+! close(out_save);
+! close(err_save);
+! #endif
+ return CSCOPE_SUCCESS;
+ } /* cs_create_connection */
+
+--- 876,927 ----
+ if ((csinfo[i].fr_fp = fdopen(from_cs[0], "r")) == NULL)
+ PERROR(_("cs_create_connection: fdopen for fr_fp failed"));
+
+ /* close unused */
+ (void)close(to_cs[0]);
+ (void)close(from_cs[1]);
+
+ break;
+ }
++
+ #else
+! /* WIN32 */
+! /* Create a new process to run cscope and use pipes to talk with it */
+! GetStartupInfo(&si);
+! si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+! si.wShowWindow = SW_HIDE; /* Hide child application window */
+! si.hStdOutput = stdout_wr;
+! si.hStdError = stdout_wr;
+! si.hStdInput = stdin_rd;
+! created = CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE,
+! NULL, NULL, &si, &pi);
+! vim_free(prog);
+! vim_free(cmd);
+!
+! if (!created)
+! {
+! PERROR(_("cs_create_connection exec failed"));
+! (void)EMSG(_("E623: Could not spawn cscope process"));
+! goto err_closing;
+! }
+! /* else */
+! csinfo[i].pid = pi.dwProcessId;
+! csinfo[i].hProc = pi.hProcess;
+! CloseHandle(pi.hThread);
+!
+! /* TODO - tidy up after failure to create files on pipe handles. */
+! if (((fd = _open_osfhandle((intptr_t)stdin_wr, _O_TEXT|_O_APPEND)) < 0)
+! || ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL))
+! PERROR(_("cs_create_connection: fdopen for to_fp failed"));
+! if (((fd = _open_osfhandle((intptr_t)stdout_rd, _O_TEXT|_O_RDONLY)) < 0)
+! || ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL))
+! PERROR(_("cs_create_connection: fdopen for fr_fp failed"));
+!
+! /* Close handles for file descriptors inherited by the cscope process */
+! CloseHandle(stdin_rd);
+! CloseHandle(stdout_wr);
+!
+! #endif /* !UNIX */
+!
+ return CSCOPE_SUCCESS;
+ } /* cs_create_connection */
+
+***************
+*** 2097,2104 ****
+ /*
+ * PRIVATE: cs_release_csp
+ *
+! * does the actual free'ing for the cs ptr with an optional flag of whether
+! * or not to free the filename. called by cs_kill and cs_reset.
+ */
+ static void
+ cs_release_csp(i, freefnpp)
+--- 2089,2096 ----
+ /*
+ * PRIVATE: cs_release_csp
+ *
+! * Does the actual free'ing for the cs ptr with an optional flag of whether
+! * or not to free the filename. Called by cs_kill and cs_reset.
+ */
+ static void
+ cs_release_csp(i, freefnpp)
+***************
+*** 2116,2125 ****
+ (void)fputs("q\n", csinfo[i].to_fp);
+ (void)fflush(csinfo[i].to_fp);
+ }
+! /* give cscope chance to exit normally */
+! if (csinfo[i].hProc != NULL
+! && WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT)
+! TerminateProcess(csinfo[i].hProc, 0);
+ #endif
+
+ if (csinfo[i].fr_fp != NULL)
+--- 2108,2120 ----
+ (void)fputs("q\n", csinfo[i].to_fp);
+ (void)fflush(csinfo[i].to_fp);
+ }
+! if (csinfo[i].hProc != NULL)
+! {
+! /* Give cscope a chance to exit normally */
+! if (WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT)
+! TerminateProcess(csinfo[i].hProc, 0);
+! CloseHandle(csinfo[i].hProc);
+! }
+ #endif
+
+ if (csinfo[i].fr_fp != NULL)
+***************
+*** 2301,2306 ****
+--- 2296,2316 ----
+ wait_return(TRUE);
+ return CSCOPE_SUCCESS;
+ } /* cs_show */
++
++
++ /*
++ * PUBLIC: cs_end
++ *
++ * Only called when VIM exits to quit any cscope sessions.
++ */
++ void
++ cs_end()
++ {
++ int i;
++
++ for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
++ cs_release_csp(i, TRUE);
++ }
+
+ #endif /* FEAT_CSCOPE */
+
+*** ../vim-7.1.099/src/if_cscope.h Thu Jun 30 23:59:58 2005
+--- src/if_cscope.h Sun Sep 2 16:51:08 2007
+***************
+*** 72,78 ****
+ ino_t st_ino; /* inode number of cscope db */
+ #else
+ # if defined(WIN32)
+! int pid; /* Can't get pid so set it to 0 ;) */
+ HANDLE hProc; /* cscope process handle */
+ DWORD nVolume; /* Volume serial number, instead of st_dev */
+ DWORD nIndexHigh; /* st_ino has no meaning in the Windows */
+--- 72,78 ----
+ ino_t st_ino; /* inode number of cscope db */
+ #else
+ # if defined(WIN32)
+! DWORD pid; /* PID of the connected cscope process. */
+ HANDLE hProc; /* cscope process handle */
+ DWORD nVolume; /* Volume serial number, instead of st_dev */
+ DWORD nIndexHigh; /* st_ino has no meaning in the Windows */
+*** ../vim-7.1.099/src/main.c Thu Aug 30 12:24:21 2007
+--- src/main.c Sun Sep 2 16:44:36 2007
+***************
+*** 1331,1336 ****
+--- 1331,1339 ----
+ #ifdef FEAT_NETBEANS_INTG
+ netbeans_end();
+ #endif
++ #ifdef FEAT_CSCOPE
++ cs_end();
++ #endif
+
+ mch_exit(exitval);
+ }
+***************
+*** 3671,3677 ****
+ mainerr_arg_missing((char_u *)filev[-1]);
+ if (mch_dirname(cwd, MAXPATHL) != OK)
+ return NULL;
+! if ((p = vim_strsave_escaped_ext(cwd, PATH_ESC_CHARS, '\\', TRUE)) == NULL)
+ return NULL;
+ ga_init2(&ga, 1, 100);
+ ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd ");
+--- 3674,3686 ----
+ mainerr_arg_missing((char_u *)filev[-1]);
+ if (mch_dirname(cwd, MAXPATHL) != OK)
+ return NULL;
+! if ((p = vim_strsave_escaped_ext(cwd,
+! #ifdef BACKSLASH_IN_FILENAME
+! "", /* rem_backslash() will tell what chars to escape */
+! #else
+! PATH_ESC_CHARS,
+! #endif
+! '\\', TRUE)) == NULL)
+ return NULL;
+ ga_init2(&ga, 1, 100);
+ ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd ");
+*** ../vim-7.1.099/src/proto/if_cscope.pro Sat May 5 19:15:39 2007
+--- src/proto/if_cscope.pro Sun Sep 2 16:51:34 2007
+***************
+*** 6,9 ****
+--- 6,10 ----
+ void cs_free_tags __ARGS((void));
+ void cs_print_tags __ARGS((void));
+ int cs_connection __ARGS((int num, char_u *dbpath, char_u *ppath));
++ void cs_end __ARGS((void));
+ /* vim: set ft=c : */
+*** ../vim-7.1.099/src/version.c Thu Sep 6 16:33:47 2007
+--- src/version.c Thu Sep 6 17:27:51 2007
+***************
+*** 668,669 ****
+--- 668,671 ----
+ { /* Add new patch number below this line */
++ /**/
++ 100,
+ /**/
+
+--
+I have to exercise early in the morning before my brain
+figures out what I'm doing.
+
+ /// 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 ///