To: vim-dev@vim.org Subject: Patch 7.3.001 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.001 Problem: When editing "src/main.c" and 'path' set to "./proto", ":find e Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.002 Problem: ":find" completion doesn't work when halfway an environment variable. (Dominique Pelle) Solution: Only use in-path completion when expanding file names. (Nazri Ramliy) Files: src/ex_docmd.c *** ../vim-7.3.001/src/ex_docmd.c 2010-08-15 21:57:27.000000000 +0200 --- src/ex_docmd.c 2010-08-16 20:51:22.000000000 +0200 *************** *** 3465,3471 **** case CMD_find: case CMD_sfind: case CMD_tabfind: ! xp->xp_context = EXPAND_FILES_IN_PATH; break; case CMD_cd: case CMD_chdir: --- 3465,3472 ---- case CMD_find: case CMD_sfind: case CMD_tabfind: ! if (xp->xp_context == EXPAND_FILES) ! xp->xp_context = EXPAND_FILES_IN_PATH; break; case CMD_cd: case CMD_chdir: *** ../vim-7.3.001/src/version.c 2010-08-16 21:46:12.000000000 +0200 --- src/version.c 2010-08-16 22:33:13.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 2, /**/ -- Warning label on a superhero Halloween costume: "Caution: Cape does not enable user to fly." /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.003 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.1.003 Problem: Crash with specific BufWritePost autocmd. (Peter Odding) Solution: Don't free the quickfix title twice. (Lech Lorens) Files: src/quickfix.c *** ../vim-7.3.002/src/quickfix.c 2010-08-15 21:57:26.000000000 +0200 --- src/quickfix.c 2010-08-16 21:15:44.000000000 +0200 *************** *** 2125,2130 **** --- 2125,2131 ---- --qi->qf_lists[idx].qf_count; } vim_free(qi->qf_lists[idx].qf_title); + qi->qf_lists[idx].qf_title = NULL; } /* *** ../vim-7.3.002/src/version.c 2010-08-16 22:33:55.000000000 +0200 --- src/version.c 2010-08-17 20:23:05.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 3, /**/ -- From "know your smileys": :-X My lips are sealed /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.004 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.004 Problem: Crash when using very long regexp. (Peter Odding) Solution: Reset reg_toolong. (Carlo Teubner) Files: src/regexp.c *** ../vim-7.3.003/src/regexp.c 2010-08-15 21:57:29.000000000 +0200 --- src/regexp.c 2010-09-14 10:51:22.000000000 +0200 *************** *** 3538,3543 **** --- 3538,3544 ---- regline = line; reglnum = 0; + reg_toolong = FALSE; /* Simplest case: Anchored match need be tried only once. */ if (prog->reganch) *** ../vim-7.3.003/src/version.c 2010-08-17 20:23:18.000000000 +0200 --- src/version.c 2010-09-14 10:52:09.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 4, /**/ -- 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 /// To: vim-dev@vim.org Subject: Patch 7.3.005 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.005 Problem: Crash when using undotree(). (Christian Brabandt) Solution: Increase the list reference count. Add a test for undotree() (Lech Lorens) Files: src/eval.c, src/testdir/Makefile, src/testdir/test61.in *** ../vim-7.3.004/src/eval.c 2010-08-15 21:57:26.000000000 +0200 --- src/eval.c 2010-09-14 12:43:04.000000000 +0200 *************** *** 7075,7081 **** } /* ! * Add a list entry to dictionary "d". * Returns FAIL when out of memory and when key already exists. */ int --- 7075,7081 ---- } /* ! * Add a list entry to dictionary "d". * Returns FAIL when out of memory and when key already exists. */ int *************** *** 7097,7102 **** --- 7097,7103 ---- dictitem_free(item); return FAIL; } + ++list->lv_refcount; return OK; } *** ../vim-7.3.004/src/testdir/Makefile 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/Makefile 2010-09-14 12:38:56.000000000 +0200 *************** *** 44,50 **** $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) clean: ! -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.pid* viminfo test1.out: test1.in -rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo --- 44,50 ---- $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) clean: ! -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.* viminfo test1.out: test1.in -rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo *** ../vim-7.3.004/src/testdir/test61.in 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/test61.in 2010-09-14 12:38:56.000000000 +0200 *************** *** 4,9 **** --- 4,13 ---- Also tests :earlier and :later. STARTTEST + :echo undotree().entries + ENDTEST + + STARTTEST :" Delete three characters and undo Gx:set ul=100 x:set ul=100 *** ../vim-7.3.004/src/version.c 2010-09-14 10:55:24.000000000 +0200 --- src/version.c 2010-09-14 12:39:59.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 5, /**/ -- 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 /// To: vim-dev@vim.org Subject: Patch 7.3.006 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.006 Problem: Can't build some multi-byte code with C89. Solution: Move code to after declarations. (Joachim Schmitz) Files: src/mbyte.c, src/spell.c *** ../vim-7.3.005/src/mbyte.c 2010-08-15 21:57:28.000000000 +0200 --- src/mbyte.c 2010-09-18 13:32:40.000000000 +0200 *************** *** 5167,5182 **** void xim_set_preedit() { - if (xic == NULL) - return; - - xim_set_focus(TRUE); - XVaNestedList attr_list; XRectangle spot_area; XPoint over_spot; int line_space; if (!xim_has_focus) { /* hide XIM cursor */ --- 5167,5182 ---- void xim_set_preedit() { XVaNestedList attr_list; XRectangle spot_area; XPoint over_spot; int line_space; + if (xic == NULL) + return; + + xim_set_focus(TRUE); + if (!xim_has_focus) { /* hide XIM cursor */ *************** *** 5554,5565 **** void xim_set_status_area() { - if (xic == NULL) - return; - XVaNestedList preedit_list = 0, status_list = 0, list = 0; XRectangle pre_area, status_area; if (input_style & XIMStatusArea) { if (input_style & XIMPreeditArea) --- 5554,5565 ---- void xim_set_status_area() { XVaNestedList preedit_list = 0, status_list = 0, list = 0; XRectangle pre_area, status_area; + if (xic == NULL) + return; + if (input_style & XIMStatusArea) { if (input_style & XIMPreeditArea) *** ../vim-7.3.005/src/spell.c 2010-08-15 21:57:32.000000000 +0200 --- src/spell.c 2010-09-18 13:34:11.000000000 +0200 *************** *** 4679,4685 **** buf_T *buf; char_u fname[MAXPATHL]; ! /* Go through all buffers and handle 'spelllang'. */ // for (buf = firstbuf; buf != NULL; buf = buf->b_next) ga_clear(&buf->b_s.b_langp); --- 4679,4685 ---- buf_T *buf; char_u fname[MAXPATHL]; ! /* Go through all buffers and handle 'spelllang'. */ for (buf = firstbuf; buf != NULL; buf = buf->b_next) ga_clear(&buf->b_s.b_langp); *** ../vim-7.3.005/src/version.c 2010-09-14 12:47:30.000000000 +0200 --- src/version.c 2010-09-18 13:34:23.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 6, /**/ -- hundred-and-one symptoms of being an internet addict: 163. You go outside for the fresh air (at -30 degrees) but open the window first to hear new mail arrive. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.007 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.007 Problem: Python code defines global "buffer". Re-implements a grow-array. Solution: Use a grow-array instead of coding the same functionality. Handle out-of-memory situation properly. Files: src/if_py_both.h *** ../vim-7.3.006/src/if_py_both.h 2010-08-15 21:57:27.000000000 +0200 --- src/if_py_both.h 2010-09-21 16:00:54.000000000 +0200 *************** *** 34,39 **** --- 34,40 ---- static PyObject *OutputWrite(PyObject *, PyObject *); static PyObject *OutputWritelines(PyObject *, PyObject *); + /* Function to write a line, points to either msg() or emsg(). */ typedef void (*writefn)(char_u *); static void writer(writefn fn, char_u *str, PyInt n); *************** *** 122,173 **** return Py_None; } ! static char_u *buffer = NULL; ! static PyInt buffer_len = 0; ! static PyInt buffer_size = 0; ! static writefn old_fn = NULL; static void - buffer_ensure(PyInt n) - { - PyInt new_size; - char_u *new_buffer; - - if (n < buffer_size) - return; - - new_size = buffer_size; - while (new_size < n) - new_size += 80; - - if (new_size != buffer_size) - { - new_buffer = alloc((unsigned)new_size); - if (new_buffer == NULL) - return; - - if (buffer) - { - memcpy(new_buffer, buffer, buffer_len); - vim_free(buffer); - } - - buffer = new_buffer; - buffer_size = new_size; - } - } - - static void PythonIO_Flush(void) { ! if (old_fn && buffer_len) { ! buffer[buffer_len] = 0; ! old_fn(buffer); } ! ! buffer_len = 0; } static void --- 123,141 ---- return Py_None; } ! /* Buffer IO, we write one whole line at a time. */ ! static garray_T io_ga = {0, 0, 1, 80, NULL}; static writefn old_fn = NULL; static void PythonIO_Flush(void) { ! if (old_fn != NULL && io_ga.ga_len > 0) { ! ((char_u *)io_ga.ga_data)[io_ga.ga_len] = NUL; ! old_fn((char_u *)io_ga.ga_data); } ! io_ga.ga_len = 0; } static void *************** *** 175,204 **** { char_u *ptr; ! if (fn != old_fn && old_fn != NULL) PythonIO_Flush(); - old_fn = fn; while (n > 0 && (ptr = memchr(str, '\n', n)) != NULL) { PyInt len = ptr - str; ! buffer_ensure(buffer_len + len + 1); ! memcpy(buffer + buffer_len, str, len); ! buffer_len += len; ! buffer[buffer_len] = 0; ! fn(buffer); str = ptr + 1; n -= len + 1; ! buffer_len = 0; } ! /* Put the remaining text into the buffer for later printing */ ! buffer_ensure(buffer_len + n + 1); ! memcpy(buffer + buffer_len, str, n); ! buffer_len += n; } /***************/ --- 143,176 ---- { char_u *ptr; ! /* Flush when switching output function. */ ! if (fn != old_fn) PythonIO_Flush(); old_fn = fn; + /* Write each NL separated line. Text after the last NL is kept for + * writing later. */ while (n > 0 && (ptr = memchr(str, '\n', n)) != NULL) { PyInt len = ptr - str; ! if (ga_grow(&io_ga, len + 1) == FAIL) ! break; ! mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)len); ! ((char *)io_ga.ga_data)[io_ga.ga_len + len] = NUL; ! fn((char_u *)io_ga.ga_data); str = ptr + 1; n -= len + 1; ! io_ga.ga_len = 0; } ! /* Put the remaining text into io_ga for later printing. */ ! if (n > 0 && ga_grow(&io_ga, n + 1) == OK) ! { ! mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)n); ! io_ga.ga_len += n; ! } } /***************/ *** ../vim-7.3.006/src/version.c 2010-09-18 13:36:41.000000000 +0200 --- src/version.c 2010-09-21 16:49:13.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 7, /**/ -- hundred-and-one symptoms of being an internet addict: 180. You maintain more than six e-mail addresses. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.008 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.008 Problem: 'cursorbind' is kept in places where 'scrollbind' is reset. Solution: Reset 'cursorbind'. Files: src/buffer.c, src/diff.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/if_cscope.c, src/macros.h, src/quickfix.c, src/search.c, src/tag.c, src/window.c *** ../vim-7.3.007/src/buffer.c 2010-08-15 21:57:32.000000000 +0200 --- src/buffer.c 2010-09-21 16:54:19.000000000 +0200 *************** *** 1288,1296 **** /* Go to the other buffer. */ set_curbuf(buf, action); ! #if defined(FEAT_LISTCMDS) && defined(FEAT_SCROLLBIND) if (action == DOBUF_SPLIT) ! curwin->w_p_scb = FALSE; /* reset 'scrollbind' */ #endif #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) --- 1288,1299 ---- /* Go to the other buffer. */ set_curbuf(buf, action); ! #if defined(FEAT_LISTCMDS) \ ! && (defined(FEAT_SCROLLBIND) || defined(FEAT_CURSORBIND)) if (action == DOBUF_SPLIT) ! { ! RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */ ! } #endif #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) *************** *** 1917,1925 **** tabpage_new(); else if (win_split(0, 0) == FAIL) /* Open in a new window */ return FAIL; ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif } } #endif --- 1920,1926 ---- tabpage_new(); else if (win_split(0, 0) == FAIL) /* Open in a new window */ return FAIL; ! RESET_BINDING(curwin); } } #endif *** ../vim-7.3.007/src/diff.c 2010-08-15 21:57:32.000000000 +0200 --- src/diff.c 2010-09-21 16:14:07.000000000 +0200 *************** *** 1127,1137 **** # endif wp->w_p_diff = TRUE; #ifdef FEAT_CURSORBIND - /* Use cursorbind if it's available */ wp->w_p_crb = TRUE; #endif - wp->w_p_scb = TRUE; wp->w_p_wrap = FALSE; # ifdef FEAT_FOLDING curwin = wp; --- 1127,1139 ---- # endif wp->w_p_diff = TRUE; + /* Use 'scrollbind' and 'cursorbind' when available */ + #ifdef FEAT_SCROLLBIND + wp->w_p_scb = TRUE; + #endif #ifdef FEAT_CURSORBIND wp->w_p_crb = TRUE; #endif wp->w_p_wrap = FALSE; # ifdef FEAT_FOLDING curwin = wp; *************** *** 1177,1186 **** { /* Set 'diff', 'scrollbind' off and 'wrap' on. */ wp->w_p_diff = FALSE; ! #ifdef FEAT_CURSORBIND ! wp->w_p_crb = FALSE; ! #endif ! wp->w_p_scb = FALSE; wp->w_p_wrap = TRUE; #ifdef FEAT_FOLDING curwin = wp; --- 1179,1185 ---- { /* Set 'diff', 'scrollbind' off and 'wrap' on. */ wp->w_p_diff = FALSE; ! RESET_BINDING(wp); wp->w_p_wrap = TRUE; #ifdef FEAT_FOLDING curwin = wp; *** ../vim-7.3.007/src/ex_cmds.c 2010-08-15 21:57:26.000000000 +0200 --- src/ex_cmds.c 2010-09-21 16:15:07.000000000 +0200 *************** *** 3498,3506 **** curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */ curwin->w_p_nu = 0; /* no line numbers */ curwin->w_p_rnu = 0; /* no relative line numbers */ ! #ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; /* no scroll binding */ ! #endif #ifdef FEAT_ARABIC curwin->w_p_arab = FALSE; /* no arabic mode */ #endif --- 3498,3504 ---- curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */ curwin->w_p_nu = 0; /* no line numbers */ curwin->w_p_rnu = 0; /* no relative line numbers */ ! RESET_BINDING(curwin); /* no scroll or cursor binding */ #ifdef FEAT_ARABIC curwin->w_p_arab = FALSE; /* no arabic mode */ #endif *************** *** 5471,5479 **** return FALSE; curwin->w_p_pvw = TRUE; curwin->w_p_wfh = TRUE; ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; /* don't take over 'scrollbind' */ ! # endif # ifdef FEAT_DIFF curwin->w_p_diff = FALSE; /* no 'diff' */ # endif --- 5469,5476 ---- return FALSE; curwin->w_p_pvw = TRUE; curwin->w_p_wfh = TRUE; ! RESET_BINDING(curwin); /* don't take over 'scrollbind' ! and 'cursorbind' */ # ifdef FEAT_DIFF curwin->w_p_diff = FALSE; /* no 'diff' */ # endif *** ../vim-7.3.007/src/ex_cmds2.c 2010-08-15 21:57:31.000000000 +0200 --- src/ex_cmds2.c 2010-09-21 16:15:17.000000000 +0200 *************** *** 2165,2173 **** { if (win_split(0, 0) == FAIL) return; ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif } else #endif --- 2165,2171 ---- { if (win_split(0, 0) == FAIL) return; ! RESET_BINDING(curwin); } else #endif *** ../vim-7.3.007/src/ex_docmd.c 2010-08-16 22:33:55.000000000 +0200 --- src/ex_docmd.c 2010-09-21 16:15:39.000000000 +0200 *************** *** 6898,6906 **** # ifdef FEAT_WINDOWS if (win_split(0, 0) == FAIL) return; ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif /* When splitting the window, create a new alist. Otherwise the * existing one is overwritten. */ --- 6898,6904 ---- # ifdef FEAT_WINDOWS if (win_split(0, 0) == FAIL) return; ! RESET_BINDING(curwin); /* When splitting the window, create a new alist. Otherwise the * existing one is overwritten. */ *************** *** 7300,7306 **** || cmdmod.browse # endif ) ! curwin->w_p_scb = FALSE; else do_check_scrollbind(FALSE); # endif --- 7298,7306 ---- || cmdmod.browse # endif ) ! { ! RESET_BINDING(curwin); ! } else do_check_scrollbind(FALSE); # endif *** ../vim-7.3.007/src/ex_getln.c 2010-08-15 21:57:28.000000000 +0200 --- src/ex_getln.c 2010-09-21 16:15:55.000000000 +0200 *************** *** 6147,6155 **** curwin->w_p_rl = cmdmsg_rl; cmdmsg_rl = FALSE; # endif ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif # ifdef FEAT_AUTOCMD /* Do execute autocommands for setting the filetype (load syntax). */ --- 6147,6153 ---- curwin->w_p_rl = cmdmsg_rl; cmdmsg_rl = FALSE; # endif ! RESET_BINDING(curwin); # ifdef FEAT_AUTOCMD /* Do execute autocommands for setting the filetype (load syntax). */ *** ../vim-7.3.007/src/if_cscope.c 2010-08-15 21:57:32.000000000 +0200 --- src/if_cscope.c 2010-09-21 16:16:26.000000000 +0200 *************** *** 1274,1282 **** { win_split(postponed_split > 0 ? postponed_split : 0, postponed_split_flags); ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif postponed_split = 0; } # endif --- 1274,1280 ---- { win_split(postponed_split > 0 ? postponed_split : 0, postponed_split_flags); ! RESET_BINDING(curwin); postponed_split = 0; } # endif *** ../vim-7.3.007/src/macros.h 2010-08-15 21:57:28.000000000 +0200 --- src/macros.h 2010-09-21 16:13:10.000000000 +0200 *************** *** 285,287 **** --- 285,301 ---- #else # define DO_AUTOCHDIR #endif + + #if defined(FEAT_SCROLLBIND) && defined(FEAT_CURSORBIND) + # define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE + #else + # if defined(FEAT_SCROLLBIND) + # define RESET_BINDING(wp) (wp)->w_p_scb = FALSE + # else + # if defined(FEAT_CURSORBIND) + # define RESET_BINDING(wp) (wp)->w_p_crb = FALSE + # else + # define RESET_BINDING(wp) + # endif + # endif + #endif *** ../vim-7.3.007/src/quickfix.c 2010-08-17 20:23:18.000000000 +0200 --- src/quickfix.c 2010-09-21 16:17:17.000000000 +0200 *************** *** 1656,1664 **** opened_window = TRUE; /* close it when fail */ p_swb = empty_option; /* don't split again */ swb_flags = 0; ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif if (ll_ref != NULL) { /* The new window should use the location list from the --- 1656,1662 ---- opened_window = TRUE; /* close it when fail */ p_swb = empty_option; /* don't split again */ swb_flags = 0; ! RESET_BINDING(curwin); if (ll_ref != NULL) { /* The new window should use the location list from the *************** *** 2334,2342 **** win_goto(lastwin); if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL) return; /* not enough room for window */ ! #ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! #endif if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) { --- 2332,2338 ---- win_goto(lastwin); if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL) return; /* not enough room for window */ ! RESET_BINDING(curwin); if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) { *** ../vim-7.3.007/src/search.c 2010-08-15 21:57:32.000000000 +0200 --- src/search.c 2010-09-21 16:17:28.000000000 +0200 *************** *** 5075,5083 **** if (win_split(0, 0) == FAIL) #endif break; ! #ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! #endif } if (depth == -1) { --- 5075,5081 ---- if (win_split(0, 0) == FAIL) #endif break; ! RESET_BINDING(curwin); } if (depth == -1) { *** ../vim-7.3.007/src/tag.c 2010-08-15 21:57:25.000000000 +0200 --- src/tag.c 2010-09-21 16:17:51.000000000 +0200 *************** *** 3143,3151 **** { win_split(postponed_split > 0 ? postponed_split : 0, postponed_split_flags); ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif } #endif --- 3143,3149 ---- { win_split(postponed_split > 0 ? postponed_split : 0, postponed_split_flags); ! RESET_BINDING(curwin); } #endif *** ../vim-7.3.007/src/window.c 2010-08-15 21:57:32.000000000 +0200 --- src/window.c 2010-09-21 16:18:44.000000000 +0200 *************** *** 525,533 **** setpcmark(); if (win_split(0, 0) == OK) { ! # ifdef FEAT_SCROLLBIND ! curwin->w_p_scb = FALSE; ! # endif (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL, ECMD_HIDE, NULL); if (nchar == 'F' && lnum >= 0) --- 525,531 ---- setpcmark(); if (win_split(0, 0) == OK) { ! RESET_BINDING(curwin); (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL, ECMD_HIDE, NULL); if (nchar == 'F' && lnum >= 0) *************** *** 3277,3285 **** if (aucmd_win != NULL) { win_init_some(aucmd_win, curwin); ! # ifdef FEAT_SCROLLBIND ! aucmd_win->w_p_scb = FALSE; ! # endif new_frame(aucmd_win); } } --- 3275,3281 ---- if (aucmd_win != NULL) { win_init_some(aucmd_win, curwin); ! RESET_BINDING(aucmd_win); new_frame(aucmd_win); } } *************** *** 3320,3329 **** /* First window in new tab page, initialize it from "oldwin". */ win_init(curwin, oldwin, 0); ! # ifdef FEAT_SCROLLBIND ! /* We don't want scroll-binding in the first window. */ ! curwin->w_p_scb = FALSE; ! # endif } #endif --- 3316,3323 ---- /* First window in new tab page, initialize it from "oldwin". */ win_init(curwin, oldwin, 0); ! /* We don't want cursor- and scroll-binding in the first window. */ ! RESET_BINDING(curwin); } #endif *** ../vim-7.3.007/src/version.c 2010-09-21 16:49:29.000000000 +0200 --- src/version.c 2010-09-21 16:53:16.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 8, /**/ -- hundred-and-one symptoms of being an internet addict: 181. You make up words that go with the "happy tune" your modem makes while dialing your ISP. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.009 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.009 Problem: Win32: Crash on Windows when using a bad argument for strftime(). (Christian Brabandt) Solution: Use the bad_param_handler(). (Mike Williams) Files: src/os_win32.c *** ../vim-7.3.008/src/os_win32.c 2010-08-15 21:57:27.000000000 +0200 --- src/os_win32.c 2010-09-21 17:02:54.000000000 +0200 *************** *** 1615,1620 **** --- 1615,1649 ---- return TRUE; } + #if ((defined(__MINGW32__) || defined (__CYGWIN32__)) && \ + __MSVCRT_VERSION__ >= 0x800) || (defined(_MSC_VER) && _MSC_VER >= 1400) + /* + * Bad parameter handler. + * + * Certain MS CRT functions will intentionally crash when passed invalid + * parameters to highlight possible security holes. Setting this function as + * the bad parameter handler will prevent the crash. + * + * In debug builds the parameters contain CRT information that might help track + * down the source of a problem, but in non-debug builds the arguments are all + * NULL/0. Debug builds will also produce assert dialogs from the CRT, it is + * worth allowing these to make debugging of issues easier. + */ + static void + bad_param_handler(const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t pReserved) + { + } + + # define SET_INVALID_PARAM_HANDLER \ + ((void)_set_invalid_parameter_handler(bad_param_handler)) + #else + # define SET_INVALID_PARAM_HANDLER + #endif + #ifdef FEAT_GUI_W32 /* *************** *** 1627,1632 **** --- 1656,1664 ---- extern int _fmode; #endif + /* Silently handle invalid parameters to CRT functions */ + SET_INVALID_PARAM_HANDLER; + /* Let critical errors result in a failure, not in a dialog box. Required * for the timestamp test to work on removed floppies. */ SetErrorMode(SEM_FAILCRITICALERRORS); *************** *** 2103,2108 **** --- 2135,2143 ---- extern int _fmode; #endif + /* Silently handle invalid parameters to CRT functions */ + SET_INVALID_PARAM_HANDLER; + /* Let critical errors result in a failure, not in a dialog box. Required * for the timestamp test to work on removed floppies. */ SetErrorMode(SEM_FAILCRITICALERRORS); *** ../vim-7.3.008/src/version.c 2010-09-21 16:56:29.000000000 +0200 --- src/version.c 2010-09-21 17:27:36.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 9, /**/ -- Wizards had always known that the act of observation changed the thing that was observed, and sometimes forgot that it also changed the observer too. Terry Pratchett - Interesting times /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.010 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.010 Problem: Mac GUI: Missing break statements. Solution: Add the break statements. (Dominique Pelle) Files: src/gui_mac.c *** ../vim-7.3.009/src/gui_mac.c 2010-08-15 21:57:28.000000000 +0200 --- src/gui_mac.c 2010-09-21 17:33:13.000000000 +0200 *************** *** 1480,1486 **** * * Returns the index inside the menu wher */ ! short /* Shoulde we return MenuItemIndex? */ gui_mac_get_menu_item_index(vimmenu_T *pMenu) { short index; --- 1480,1486 ---- * * Returns the index inside the menu wher */ ! short /* Should we return MenuItemIndex? */ gui_mac_get_menu_item_index(vimmenu_T *pMenu) { short index; *************** *** 1823,1829 **** p.h += gui.scrollbar_width; if (gui.which_scrollbars[SBAR_RIGHT]) p.h += gui.scrollbar_width; ! /* ideal height is as heigh as we can get */ p.v = 15 * 1024; thePart = IsWindowInStandardState(whichWindow, &p, &r) --- 1823,1829 ---- p.h += gui.scrollbar_width; if (gui.which_scrollbars[SBAR_RIGHT]) p.h += gui.scrollbar_width; ! /* ideal height is as high as we can get */ p.v = 15 * 1024; thePart = IsWindowInStandardState(whichWindow, &p, &r) *************** *** 4481,4487 **** * event arrives. No need to check for input_buf_full because we are * returning as soon as it contains a single char. */ ! /* TODO: reduce wtime accordinly??? */ if (wtime > -1) sleeppyTick = 60 * wtime / 1000; else --- 4481,4487 ---- * event arrives. No need to check for input_buf_full because we are * returning as soon as it contains a single char. */ ! /* TODO: reduce wtime accordingly??? */ if (wtime > -1) sleeppyTick = 60 * wtime / 1000; else *************** *** 5723,5735 **** iconDITL = GetResource('DITL', 131); switch (type) { ! case VIM_GENERIC: useIcon = kNoteIcon; ! case VIM_ERROR: useIcon = kStopIcon; ! case VIM_WARNING: useIcon = kCautionIcon; ! case VIM_INFO: useIcon = kNoteIcon; ! case VIM_QUESTION: useIcon = kNoteIcon; ! default: useIcon = kStopIcon; ! }; AppendDITL(theDialog, iconDITL, overlayDITL); ReleaseResource(iconDITL); GetDialogItem(theDialog, iconItm.idx, &itemType, &itemHandle, &box); --- 5723,5735 ---- iconDITL = GetResource('DITL', 131); switch (type) { ! case VIM_GENERIC: ! case VIM_INFO: ! case VIM_QUESTION: useIcon = kNoteIcon; break; ! case VIM_WARNING: useIcon = kCautionIcon; break; ! case VIM_ERROR: useIcon = kStopIcon; break; ! default: useIcon = kStopIcon; ! } AppendDITL(theDialog, iconDITL, overlayDITL); ReleaseResource(iconDITL); GetDialogItem(theDialog, iconItm.idx, &itemType, &itemHandle, &box); *************** *** 5892,5898 **** return itemHit; /* ! * Usefull thing which could be used * SetDialogTimeout(): Auto click a button after timeout * SetDialogTracksCursor() : Get the I-beam cursor over input box * MoveDialogItem(): Probably better than SetDialogItem --- 5892,5898 ---- return itemHit; /* ! * Useful thing which could be used * SetDialogTimeout(): Auto click a button after timeout * SetDialogTracksCursor() : Get the I-beam cursor over input box * MoveDialogItem(): Probably better than SetDialogItem *************** *** 6100,6106 **** #endif /* ! * Transfered from os_mac.c for MacOS X using os_unix.c prep work */ int --- 6100,6106 ---- #endif /* ! * Transferred from os_mac.c for MacOS X using os_unix.c prep work */ int *************** *** 6543,6549 **** static ControlRef dataBrowser = NULL; // when the tabline is hidden, vim doesn't call update_tabline(). When ! // the tabline is shown again, show_tabline() is called before upate_tabline(), // and because of this, the tab labels and vims internal tabs are out of sync // for a very short time. to prevent inconsistent state, we store the labels // of the tabs, not pointers to the tabs (which are invalid for a short time). --- 6543,6549 ---- static ControlRef dataBrowser = NULL; // when the tabline is hidden, vim doesn't call update_tabline(). When ! // the tabline is shown again, show_tabline() is called before update_tabline(), // and because of this, the tab labels and vims internal tabs are out of sync // for a very short time. to prevent inconsistent state, we store the labels // of the tabs, not pointers to the tabs (which are invalid for a short time). *** ../vim-7.3.009/src/version.c 2010-09-21 17:29:19.000000000 +0200 --- src/version.c 2010-09-21 17:33:22.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 10, /**/ -- hundred-and-one symptoms of being an internet addict: 182. You may not know what is happening in the world, but you know every bit of net-gossip there is. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.011 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.011 Problem: X11 clipboard doesn't work in Athena/Motif GUI. First selection after a shell command doesn't work. Solution: When using the GUI use XtLastTimestampProcessed() instead of changing a property. (partly by Toni Ronkko) When executing a shell command disown the selection. Files: src/ui.c, src/os_unix.c *** ../vim-7.3.010/src/ui.c 2010-08-15 21:57:31.000000000 +0200 --- src/ui.c 2010-09-21 22:08:22.000000000 +0200 *************** *** 469,475 **** */ #ifdef FEAT_X11 /* Always own the selection, we might have lost it without being ! * notified. */ if (cbd->available) { int was_owned = cbd->owned; --- 469,475 ---- */ #ifdef FEAT_X11 /* Always own the selection, we might have lost it without being ! * notified, e.g. during a ":sh" command. */ if (cbd->available) { int was_owned = cbd->owned; *************** *** 1944,1953 **** */ static Boolean clip_x11_convert_selection_cb __ARGS((Widget, Atom *, Atom *, Atom *, XtPointer *, long_u *, int *)); - static void clip_x11_lose_ownership_cb __ARGS((Widget, Atom *)); - static void clip_x11_timestamp_cb __ARGS((Widget w, XtPointer n, XEvent *event, Boolean *cont)); /* * Property callback to get a timestamp for XtOwnSelection. --- 1944,1952 ---- */ static Boolean clip_x11_convert_selection_cb __ARGS((Widget, Atom *, Atom *, Atom *, XtPointer *, long_u *, int *)); static void clip_x11_lose_ownership_cb __ARGS((Widget, Atom *)); static void clip_x11_timestamp_cb __ARGS((Widget w, XtPointer n, XEvent *event, Boolean *cont)); + static void clip_x11_request_selection_cb __ARGS((Widget, XtPointer, Atom *, Atom *, XtPointer, long_u *, int *)); /* * Property callback to get a timestamp for XtOwnSelection. *************** *** 1985,1992 **** return; /* Get the selection, using the event timestamp. */ ! XtOwnSelection(w, xproperty->atom, xproperty->time, ! clip_x11_convert_selection_cb, clip_x11_lose_ownership_cb, NULL); } void --- 1984,2000 ---- return; /* Get the selection, using the event timestamp. */ ! if (XtOwnSelection(w, xproperty->atom, xproperty->time, ! clip_x11_convert_selection_cb, clip_x11_lose_ownership_cb, ! NULL) == OK) ! { ! /* Set the "owned" flag now, there may have been a call to ! * lose_ownership_cb in between. */ ! if (xproperty->atom == clip_plus.sel_atom) ! clip_plus.owned = TRUE; ! else ! clip_star.owned = TRUE; ! } } void *************** *** 1997,2004 **** /*(XtEventHandler)*/clip_x11_timestamp_cb, (XtPointer)NULL); } - static void clip_x11_request_selection_cb __ARGS((Widget, XtPointer, Atom *, Atom *, XtPointer, long_u *, int *)); - static void clip_x11_request_selection_cb(w, success, sel_atom, type, value, length, format) --- 2005,2010 ---- *************** *** 2336,2342 **** void clip_x11_lose_selection(myShell, cbd) ! Widget myShell; VimClipboard *cbd; { XtDisownSelection(myShell, cbd->sel_atom, CurrentTime); --- 2342,2348 ---- void clip_x11_lose_selection(myShell, cbd) ! Widget myShell; VimClipboard *cbd; { XtDisownSelection(myShell, cbd->sel_atom, CurrentTime); *************** *** 2344,2357 **** int clip_x11_own_selection(myShell, cbd) ! Widget myShell; VimClipboard *cbd; { ! /* Get the time by a zero-length append, clip_x11_timestamp_cb will be ! * called with the current timestamp. */ ! if (!XChangeProperty(XtDisplay(myShell), XtWindow(myShell), cbd->sel_atom, ! timestamp_atom, 32, PropModeAppend, NULL, 0)) return FAIL; /* Flush is required in a terminal as nothing else is doing it. */ XFlush(XtDisplay(myShell)); return OK; --- 2350,2378 ---- int clip_x11_own_selection(myShell, cbd) ! Widget myShell; VimClipboard *cbd; { ! /* When using the GUI we have proper timestamps, use the one of the last ! * event. When in the console we don't get events (the terminal gets ! * them), Get the time by a zero-length append, clip_x11_timestamp_cb will ! * be called with the current timestamp. */ ! #ifdef FEAT_GUI ! if (gui.in_use) ! { ! if (XtOwnSelection(myShell, cbd->sel_atom, ! XtLastTimestampProcessed(XtDisplay(myShell)), ! clip_x11_convert_selection_cb, clip_x11_lose_ownership_cb, ! NULL) == False) return FAIL; + } + else + #endif + { + if (!XChangeProperty(XtDisplay(myShell), XtWindow(myShell), + cbd->sel_atom, timestamp_atom, 32, PropModeAppend, NULL, 0)) + return FAIL; + } /* Flush is required in a terminal as nothing else is doing it. */ XFlush(XtDisplay(myShell)); return OK; *** ../vim-7.3.010/src/os_unix.c 2010-08-15 21:57:30.000000000 +0200 --- src/os_unix.c 2010-09-21 21:59:25.000000000 +0200 *************** *** 1123,1128 **** --- 1123,1152 ---- } #endif + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + static void loose_clipboard __ARGS((void)); + + /* + * Called when Vim is going to sleep or execute a shell command. + * We can't respond to requests for the X selections. Lose them, otherwise + * other applications will hang. But first copy the text to cut buffer 0. + */ + static void + loose_clipboard() + { + if (clip_star.owned || clip_plus.owned) + { + x11_export_final_selection(); + if (clip_star.owned) + clip_lose_selection(&clip_star); + if (clip_plus.owned) + clip_lose_selection(&clip_plus); + if (x11_display != NULL) + XFlush(x11_display); + } + } + #endif + /* * If the machine has job control, use it to suspend the program, * otherwise fake it by starting a new shell. *************** *** 1137,1155 **** out_flush(); /* needed to disable mouse on some systems */ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ! /* Since we are going to sleep, we can't respond to requests for the X ! * selections. Lose them, otherwise other applications will hang. But ! * first copy the text to cut buffer 0. */ ! if (clip_star.owned || clip_plus.owned) ! { ! x11_export_final_selection(); ! if (clip_star.owned) ! clip_lose_selection(&clip_star); ! if (clip_plus.owned) ! clip_lose_selection(&clip_plus); ! if (x11_display != NULL) ! XFlush(x11_display); ! } # endif # if defined(_REENTRANT) && defined(SIGCONT) --- 1161,1167 ---- out_flush(); /* needed to disable mouse on some systems */ # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ! loose_clipboard(); # endif # if defined(_REENTRANT) && defined(SIGCONT) *************** *** 3706,3711 **** --- 3718,3727 ---- if (options & SHELL_COOKED) settmode(TMODE_COOK); /* set to normal mode */ + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + loose_clipboard(); + # endif + # ifdef __EMX__ if (cmd == NULL) x = system(""); /* this starts an interactive shell in emx */ *************** *** 3814,3826 **** # endif int did_settmode = FALSE; /* settmode(TMODE_RAW) called */ out_flush(); if (options & SHELL_COOKED) settmode(TMODE_COOK); /* set to normal mode */ ! newcmd = vim_strsave(p_sh); ! if (newcmd == NULL) /* out of memory */ ! goto error; /* * Do this loop twice: --- 3830,3846 ---- # endif int did_settmode = FALSE; /* settmode(TMODE_RAW) called */ + newcmd = vim_strsave(p_sh); + if (newcmd == NULL) /* out of memory */ + goto error; + out_flush(); if (options & SHELL_COOKED) settmode(TMODE_COOK); /* set to normal mode */ ! # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) ! loose_clipboard(); ! # endif /* * Do this loop twice: *** ../vim-7.3.010/src/version.c 2010-09-21 17:34:26.000000000 +0200 --- src/version.c 2010-09-21 20:45:02.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 11, /**/ -- hundred-and-one symptoms of being an internet addict: 184. You no longer ask prospective dates what their sign is, instead your line is "Hi, what's your URL?" /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.012 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.012 Problem: Problems building with MingW. Solution: Adjust the MingW makefiles. (Jon) Files: src/Make_ming.mak, src/GvimExt/Make_ming.mak *** ../vim-7.3.011/src/Make_ming.mak 2010-08-15 21:57:32.000000000 +0200 --- src/Make_ming.mak 2010-09-29 12:32:13.000000000 +0200 *************** *** 303,309 **** endif endif CC := $(CROSS_COMPILE)gcc ! WINDRES := $(CROSS_COMPILE)windres #>>>>> end of choices ########################################################################### --- 303,309 ---- endif endif CC := $(CROSS_COMPILE)gcc ! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" - #>>>>> end of choices ########################################################################### *** ../vim-7.3.011/src/GvimExt/Make_ming.mak 2010-08-15 21:57:29.000000000 +0200 --- src/GvimExt/Make_ming.mak 2010-09-29 12:31:07.000000000 +0200 *************** *** 33,39 **** endif endif CXX := $(CROSS_COMPILE)g++ ! WINDRES := $(CROSS_COMPILE)windres LIBS := -luuid RES := gvimext.res DEFFILE = gvimext_ming.def --- 33,39 ---- endif endif CXX := $(CROSS_COMPILE)g++ ! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" - LIBS := -luuid RES := gvimext.res DEFFILE = gvimext_ming.def *** ../vim-7.3.011/src/version.c 2010-09-21 22:09:28.000000000 +0200 --- src/version.c 2010-09-29 12:36:42.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 12, /**/ -- If evolution theories are correct, humans will soon grow a third hand for operating the mouse. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.013 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.013 Problem: Dynamic loading with Ruby doesn't work for 1.9.2. Solution: Handle rb_str2cstr differently. Also support dynamic loading on Unix. (Jon Maken) Files: src/if_ruby.c *** ../vim-7.3.012/src/if_ruby.c 2010-08-15 21:57:25.000000000 +0200 --- src/if_ruby.c 2010-09-29 12:49:50.000000000 +0200 *************** *** 4,9 **** --- 4,10 ---- * * Ruby interface by Shugo Maeda * with improvements by SegPhault (Ryan Paul) + * with improvements by Jon Maken * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. *************** *** 26,37 **** # define RUBYEXTERN extern #endif /* * This is tricky. In ruby.h there is (inline) function rb_class_of() * definition. This function use these variables. But we want function to * use dll_* variables. */ - #ifdef DYNAMIC_RUBY # define rb_cFalseClass (*dll_rb_cFalseClass) # define rb_cFixnum (*dll_rb_cFixnum) # define rb_cNilClass (*dll_rb_cNilClass) --- 27,38 ---- # define RUBYEXTERN extern #endif + #ifdef DYNAMIC_RUBY /* * This is tricky. In ruby.h there is (inline) function rb_class_of() * definition. This function use these variables. But we want function to * use dll_* variables. */ # define rb_cFalseClass (*dll_rb_cFalseClass) # define rb_cFixnum (*dll_rb_cFixnum) # define rb_cNilClass (*dll_rb_cNilClass) *************** *** 46,53 **** --- 47,67 ---- */ # define RUBY_EXPORT # endif + + #if !(defined(WIN32) || defined(_WIN64)) + # include + # define HANDLE void* + # define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL) + # define symbol_from_dll dlsym + # define close_dll dlclose + #else + # define load_dll LoadLibrary + # define symbol_from_dll GetProcAddress + # define close_dll FreeLibrary #endif + #endif /* ifdef DYNAMIC_RUBY */ + /* suggested by Ariya Mizutani */ #if (_MSC_VER == 1200) # undef _WIN32_WINNT *************** *** 166,172 **** #define rb_obj_as_string dll_rb_obj_as_string #define rb_obj_id dll_rb_obj_id #define rb_raise dll_rb_raise - #define rb_str2cstr dll_rb_str2cstr #define rb_str_cat dll_rb_str_cat #define rb_str_concat dll_rb_str_concat #define rb_str_new dll_rb_str_new --- 180,185 ---- *************** *** 178,187 **** --- 191,203 ---- # define rb_str_new2 dll_rb_str_new2 #endif #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + # define rb_string_value dll_rb_string_value # define rb_string_value_ptr dll_rb_string_value_ptr # define rb_float_new dll_rb_float_new # define rb_ary_new dll_rb_ary_new # define rb_ary_push dll_rb_ary_push + #else + # define rb_str2cstr dll_rb_str2cstr #endif #ifdef RUBY19_OR_LATER # define rb_errinfo dll_rb_errinfo *************** *** 246,252 **** --- 262,272 ---- static VALUE (*dll_rb_obj_as_string) (VALUE); static VALUE (*dll_rb_obj_id) (VALUE); static void (*dll_rb_raise) (VALUE, const char*, ...); + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + static VALUE (*dll_rb_string_value) (volatile VALUE*); + #else static char *(*dll_rb_str2cstr) (VALUE,int*); + #endif static VALUE (*dll_rb_str_cat) (VALUE, const char*, long); static VALUE (*dll_rb_str_concat) (VALUE, VALUE); static VALUE (*dll_rb_str_new) (const char*, long); *************** *** 347,353 **** --- 367,377 ---- {"rb_obj_as_string", (RUBY_PROC*)&dll_rb_obj_as_string}, {"rb_obj_id", (RUBY_PROC*)&dll_rb_obj_id}, {"rb_raise", (RUBY_PROC*)&dll_rb_raise}, + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 + {"rb_string_value", (RUBY_PROC*)&dll_rb_string_value}, + #else {"rb_str2cstr", (RUBY_PROC*)&dll_rb_str2cstr}, + #endif {"rb_str_cat", (RUBY_PROC*)&dll_rb_str_cat}, {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat}, {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new}, *************** *** 399,405 **** { if (hinstRuby) { ! FreeLibrary(hinstRuby); hinstRuby = 0; } } --- 423,429 ---- { if (hinstRuby) { ! close_dll(hinstRuby); hinstRuby = 0; } } *************** *** 416,422 **** if (hinstRuby) return OK; ! hinstRuby = LoadLibrary(libname); if (!hinstRuby) { if (verbose) --- 440,446 ---- if (hinstRuby) return OK; ! hinstRuby = load_dll(libname); if (!hinstRuby) { if (verbose) *************** *** 426,435 **** for (i = 0; ruby_funcname_table[i].ptr; ++i) { ! if (!(*ruby_funcname_table[i].ptr = GetProcAddress(hinstRuby, ruby_funcname_table[i].name))) { ! FreeLibrary(hinstRuby); hinstRuby = 0; if (verbose) EMSG2(_(e_loadfunc), ruby_funcname_table[i].name); --- 450,459 ---- for (i = 0; ruby_funcname_table[i].ptr; ++i) { ! if (!(*ruby_funcname_table[i].ptr = symbol_from_dll(hinstRuby, ruby_funcname_table[i].name))) { ! close_dll(hinstRuby); hinstRuby = 0; if (verbose) EMSG2(_(e_loadfunc), ruby_funcname_table[i].name); *** ../vim-7.3.012/src/version.c 2010-09-29 12:37:53.000000000 +0200 --- src/version.c 2010-09-29 13:00:42.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 13, /**/ -- 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 /// To: vim-dev@vim.org Subject: Patch 7.3.014 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.014 Problem: Ending a line in a backslash inside an ":append" or ":insert" command in Ex mode doesn't work properly. (Ray Frush) Solution: Halve the number of backslashes, only insert a NUL after an odd number of backslashes. Files: src/ex_getln.c *** ../vim-7.3.013/src/ex_getln.c 2010-09-21 16:56:29.000000000 +0200 --- src/ex_getln.c 2010-09-29 15:47:56.000000000 +0200 *************** *** 2342,2356 **** windgoto(msg_row, msg_col); pend = (char_u *)(line_ga.ga_data) + line_ga.ga_len; ! /* we are done when a NL is entered, but not when it comes after a ! * backslash */ ! if (line_ga.ga_len > 0 && pend[-1] == '\n' ! && (line_ga.ga_len <= 1 || pend[-2] != '\\')) ! { ! --line_ga.ga_len; ! --pend; ! *pend = NUL; ! break; } } --- 2342,2372 ---- windgoto(msg_row, msg_col); pend = (char_u *)(line_ga.ga_data) + line_ga.ga_len; ! /* We are done when a NL is entered, but not when it comes after an ! * odd number of backslashes, that results in a NUL. */ ! if (line_ga.ga_len > 0 && pend[-1] == '\n') ! { ! int bcount = 0; ! ! while (line_ga.ga_len - 2 >= bcount && pend[-2 - bcount] == '\\') ! ++bcount; ! ! if (bcount > 0) ! { ! /* Halve the number of backslashes: "\NL" -> "NUL", "\\NL" -> ! * "\NL", etc. */ ! line_ga.ga_len -= (bcount + 1) / 2; ! pend -= (bcount + 1) / 2; ! pend[-1] = '\n'; ! } ! ! if ((bcount & 1) == 0) ! { ! --line_ga.ga_len; ! --pend; ! *pend = NUL; ! break; ! } } } *** ../vim-7.3.013/src/version.c 2010-09-29 13:02:48.000000000 +0200 --- src/version.c 2010-09-29 15:45:57.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 14, /**/ -- hundred-and-one symptoms of being an internet addict: 224. You set up your own Web page. You set up a Web page for each of your kids... and your pets. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.015 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.015 Problem: Test is using error message that no longer exists. Solution: Change E106 to E121. (Dominique Pelle) Files: src/testdir/test49.vim *** ../vim-7.3.014/src/testdir/test49.vim 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/test49.vim 2010-09-29 16:52:06.000000000 +0200 *************** *** 1,6 **** " Vim script language tests " Author: Servatius Brandt ! " Last Change: 2006 Apr 28 "------------------------------------------------------------------------------- " Test environment {{{1 --- 1,6 ---- " Vim script language tests " Author: Servatius Brandt ! " Last Change: 2010 Sep 29 "------------------------------------------------------------------------------- " Test environment {{{1 *************** *** 8711,8717 **** endif else if cmd == "let" ! let match = MATCH(0, thrmsg, 'E106', "Unknown variable") elseif cmd == "unlet" let match = MATCH(0, thrmsg, 'E108', "No such variable") endif --- 8711,8717 ---- endif else if cmd == "let" ! let match = MATCH(0, thrmsg, 'E121', "Undefined variable") elseif cmd == "unlet" let match = MATCH(0, thrmsg, 'E108', "No such variable") endif *** ../vim-7.3.014/src/version.c 2010-09-29 15:50:14.000000000 +0200 --- src/version.c 2010-09-29 16:55:03.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 15, /**/ -- hundred-and-one symptoms of being an internet addict: 228. You spend Saturday night making the counter on your home page pass that 2000 mark. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.016 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.016 Problem: Netbeans doesn't work under Athena. Solution: Support Athena, just like Motif. (Xavier de Gaye) Files: runtime/doc/netbeans.txt, src/gui.c, src/main.c, src/netbeans.c *** ../vim-7.3.015/runtime/doc/netbeans.txt 2010-08-15 21:57:13.000000000 +0200 --- runtime/doc/netbeans.txt 2010-09-29 17:13:43.000000000 +0200 *************** *** 1,4 **** ! *netbeans.txt* For Vim version 7.3. Last change: 2010 Jul 20 VIM REFERENCE MANUAL by Gordon Prieur et al. --- 1,4 ---- ! *netbeans.txt* For Vim version 7.3. Last change: 2010 Aug 20 VIM REFERENCE MANUAL by Gordon Prieur et al. *************** *** 118,124 **** uncommenting a line with "--disable-netbeans" in the Makefile. Currently the NetBeans interface is supported by Vim running in a terminal and ! by GVim when it is run with one of the following GUIs: GTK, GNOME, and Motif. If Motif support is required the user must supply XPM libraries. See |workshop-xpm| for details on obtaining the latest version of XPM. --- 118,125 ---- uncommenting a line with "--disable-netbeans" in the Makefile. Currently the NetBeans interface is supported by Vim running in a terminal and ! by GVim when it is run with one of the following GUIs: GTK, GNOME, Windows, ! Athena and Motif. If Motif support is required the user must supply XPM libraries. See |workshop-xpm| for details on obtaining the latest version of XPM. *** ../vim-7.3.015/src/gui.c 2010-08-15 21:57:28.000000000 +0200 --- src/gui.c 2010-09-29 17:13:43.000000000 +0200 *************** *** 2352,2358 **** if (draw_sign) /* Draw the sign on top of the spaces. */ gui_mch_drawsign(gui.row, col, gui.highlight_mask); ! # if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_MOTIF) \ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) if (multi_sign) netbeans_draw_multisign_indicator(gui.row); --- 2352,2358 ---- if (draw_sign) /* Draw the sign on top of the spaces. */ gui_mch_drawsign(gui.row, col, gui.highlight_mask); ! # if defined(FEAT_NETBEANS_INTG) && (defined(FEAT_GUI_X11) \ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)) if (multi_sign) netbeans_draw_multisign_indicator(gui.row); *** ../vim-7.3.015/src/main.c 2010-08-15 21:57:28.000000000 +0200 --- src/main.c 2010-09-29 17:13:43.000000000 +0200 *************** *** 940,946 **** if (netbeansArg != NULL && strncmp("-nb", netbeansArg, 3) == 0) { # ifdef FEAT_GUI ! # if !defined(FEAT_GUI_MOTIF) && !defined(FEAT_GUI_GTK) \ && !defined(FEAT_GUI_W32) if (gui.in_use) { --- 940,946 ---- if (netbeansArg != NULL && strncmp("-nb", netbeansArg, 3) == 0) { # ifdef FEAT_GUI ! # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ && !defined(FEAT_GUI_W32) if (gui.in_use) { *** ../vim-7.3.015/src/netbeans.c 2010-08-15 21:57:26.000000000 +0200 --- src/netbeans.c 2010-09-29 17:13:43.000000000 +0200 *************** *** 87,93 **** static void nb_init_graphics __ARGS((void)); static void coloncmd __ARGS((char *cmd, ...)); static void nb_set_curbuf __ARGS((buf_T *buf)); ! #ifdef FEAT_GUI_MOTIF static void messageFromNetbeans __ARGS((XtPointer, int *, XtInputId *)); #endif #ifdef FEAT_GUI_GTK --- 87,93 ---- static void nb_init_graphics __ARGS((void)); static void coloncmd __ARGS((char *cmd, ...)); static void nb_set_curbuf __ARGS((buf_T *buf)); ! #ifdef FEAT_GUI_X11 static void messageFromNetbeans __ARGS((XtPointer, int *, XtInputId *)); #endif #ifdef FEAT_GUI_GTK *************** *** 112,118 **** static NBSOCK nbsock = -1; /* socket fd for Netbeans connection */ #define NETBEANS_OPEN (nbsock != -1) ! #ifdef FEAT_GUI_MOTIF static XtInputId inputHandler = (XtInputId)NULL; /* Cookie for input */ #endif #ifdef FEAT_GUI_GTK --- 112,118 ---- static NBSOCK nbsock = -1; /* socket fd for Netbeans connection */ #define NETBEANS_OPEN (nbsock != -1) ! #ifdef FEAT_GUI_X11 static XtInputId inputHandler = (XtInputId)NULL; /* Cookie for input */ #endif #ifdef FEAT_GUI_GTK *************** *** 143,149 **** netbeans_send_disconnect(); ! #ifdef FEAT_GUI_MOTIF if (inputHandler != (XtInputId)NULL) { XtRemoveInput(inputHandler); --- 143,149 ---- netbeans_send_disconnect(); ! #ifdef FEAT_GUI_X11 if (inputHandler != (XtInputId)NULL) { XtRemoveInput(inputHandler); *************** *** 700,706 **** /* * Read a command from netbeans. */ ! #ifdef FEAT_GUI_MOTIF static void messageFromNetbeans(XtPointer clientData UNUSED, int *unused1 UNUSED, --- 700,706 ---- /* * Read a command from netbeans. */ ! #ifdef FEAT_GUI_X11 static void messageFromNetbeans(XtPointer clientData UNUSED, int *unused1 UNUSED, *************** *** 2937,2943 **** if (!NB_HAS_GUI || !NETBEANS_OPEN) return; ! # ifdef FEAT_GUI_MOTIF /* tell notifier we are interested in being called * when there is input on the editor connection socket */ --- 2937,2943 ---- if (!NB_HAS_GUI || !NETBEANS_OPEN) return; ! # ifdef FEAT_GUI_X11 /* tell notifier we are interested in being called * when there is input on the editor connection socket */ *************** *** 3027,3033 **** } } ! #if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_W32) || defined(PROTO) /* * Tell netbeans that the window was moved or resized. */ --- 3027,3033 ---- } } ! #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_W32) || defined(PROTO) /* * Tell netbeans that the window was moved or resized. */ *************** *** 3458,3464 **** return FALSE; } ! #if defined(FEAT_GUI_MOTIF) || defined(PROTO) /* * We have multiple signs to draw at the same location. Draw the * multi-sign indicator instead. This is the Motif version. --- 3458,3464 ---- return FALSE; } ! #if defined(FEAT_GUI_X11) || defined(PROTO) /* * We have multiple signs to draw at the same location. Draw the * multi-sign indicator instead. This is the Motif version. *************** *** 3487,3493 **** XDrawPoint(gui.dpy, gui.wid, gui.text_gc, x+3, y++); XDrawPoint(gui.dpy, gui.wid, gui.text_gc, x+2, y); } ! #endif /* FEAT_GUI_MOTIF */ #if defined(FEAT_GUI_GTK) && !defined(PROTO) /* --- 3487,3493 ---- XDrawPoint(gui.dpy, gui.wid, gui.text_gc, x+3, y++); XDrawPoint(gui.dpy, gui.wid, gui.text_gc, x+2, y); } ! #endif /* FEAT_GUI_X11 */ #if defined(FEAT_GUI_GTK) && !defined(PROTO) /* *** ../vim-7.3.015/src/version.c 2010-09-29 16:55:45.000000000 +0200 --- src/version.c 2010-09-29 17:14:47.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 16, /**/ -- hundred-and-one symptoms of being an internet addict: 229. You spend so much time thinking what to add on this list. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.017 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.017 Problem: smatch reports errors. Solution: Fix the reported errors. (Dominique Pelle) Files: src/spell.c, src/syntax.c *** ../vim-7.3.016/src/spell.c 2010-09-18 13:36:41.000000000 +0200 --- src/spell.c 2010-09-29 18:25:09.000000000 +0200 *************** *** 4951,4957 **** char_u *si_info; /* info text chars or NULL */ int si_region_count; /* number of regions supported (1 when there are no regions) */ ! char_u si_region_name[16]; /* region names; used only if * si_region_count > 1) */ garray_T si_rep; /* list of fromto_T entries from REP lines */ --- 4951,4957 ---- char_u *si_info; /* info text chars or NULL */ int si_region_count; /* number of regions supported (1 when there are no regions) */ ! char_u si_region_name[17]; /* region names; used only if * si_region_count > 1) */ garray_T si_rep; /* list of fromto_T entries from REP lines */ *************** *** 9530,9536 **** if (aspath) /* Use directory of an entry with path, e.g., for * "/dir/lg.utf-8.spl" use "/dir". */ ! vim_strncpy(buf, curbuf->b_s.b_p_spl, lstart - curbuf->b_s.b_p_spl - 1); else /* Copy the path from 'runtimepath' to buf[]. */ copy_option_part(&rtp, buf, MAXPATHL, ","); --- 9530,9537 ---- if (aspath) /* Use directory of an entry with path, e.g., for * "/dir/lg.utf-8.spl" use "/dir". */ ! vim_strncpy(buf, curbuf->b_s.b_p_spl, ! lstart - curbuf->b_s.b_p_spl - 1); else /* Copy the path from 'runtimepath' to buf[]. */ copy_option_part(&rtp, buf, MAXPATHL, ","); *************** *** 9539,9551 **** /* Use the first language name from 'spelllang' and the * encoding used in the first loaded .spl file. */ if (aspath) ! vim_strncpy(buf, curbuf->b_s.b_p_spl, lend - curbuf->b_s.b_p_spl); else { /* Create the "spell" directory if it doesn't exist yet. */ l = (int)STRLEN(buf); vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell"); ! if (!filewritable(buf) != 2) vim_mkdir(buf, 0755); l = (int)STRLEN(buf); --- 9540,9553 ---- /* Use the first language name from 'spelllang' and the * encoding used in the first loaded .spl file. */ if (aspath) ! vim_strncpy(buf, curbuf->b_s.b_p_spl, ! lend - curbuf->b_s.b_p_spl); else { /* Create the "spell" directory if it doesn't exist yet. */ l = (int)STRLEN(buf); vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell"); ! if (filewritable(buf) != 2) vim_mkdir(buf, 0755); l = (int)STRLEN(buf); *** ../vim-7.3.016/src/syntax.c 2010-08-15 21:57:32.000000000 +0200 --- src/syntax.c 2010-09-29 18:28:26.000000000 +0200 *************** *** 7600,7609 **** /* * Copy characters from arg[] to buf[], translating <> codes. */ ! for (p = arg, off = 0; off < 100 && *p; ) { len = trans_special(&p, buf + off, FALSE); ! if (len) /* recognized special char */ off += len; else /* copy as normal char */ buf[off++] = *p++; --- 7600,7609 ---- /* * Copy characters from arg[] to buf[], translating <> codes. */ ! for (p = arg, off = 0; off < 100 - 6 && *p; ) { len = trans_special(&p, buf + off, FALSE); ! if (len > 0) /* recognized special char */ off += len; else /* copy as normal char */ buf[off++] = *p++; *** ../vim-7.3.016/src/version.c 2010-09-29 17:26:57.000000000 +0200 --- src/version.c 2010-09-29 17:47:27.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 17, /**/ -- A computer without Windows is like a fish without a bicycle. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.018 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.018 (after 7.3.012) Problem: Missing argument to windres in MingW makefiles. Solution: Add the argument that was wrapped in the patch. (Jon Maken) Files: src/Make_ming.mak, src/GvimExt/Make_ming.mak *** ../vim-7.3.017/src/Make_ming.mak 2010-09-29 12:37:53.000000000 +0200 --- src/Make_ming.mak 2010-09-29 18:37:08.000000000 +0200 *************** *** 303,309 **** endif endif CC := $(CROSS_COMPILE)gcc ! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" - #>>>>> end of choices ########################################################################### --- 303,309 ---- endif endif CC := $(CROSS_COMPILE)gcc ! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED #>>>>> end of choices ########################################################################### *** ../vim-7.3.017/src/GvimExt/Make_ming.mak 2010-09-29 12:37:53.000000000 +0200 --- src/GvimExt/Make_ming.mak 2010-09-29 18:36:39.000000000 +0200 *************** *** 33,39 **** endif endif CXX := $(CROSS_COMPILE)g++ ! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" - LIBS := -luuid RES := gvimext.res DEFFILE = gvimext_ming.def --- 33,39 ---- endif endif CXX := $(CROSS_COMPILE)g++ ! WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED LIBS := -luuid RES := gvimext.res DEFFILE = gvimext_ming.def *** ../vim-7.3.017/src/version.c 2010-09-29 18:32:47.000000000 +0200 --- src/version.c 2010-09-29 18:41:53.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 18, /**/ -- hundred-and-one symptoms of being an internet addict: 231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner in the front doorway permanently so it always looks like you are actually attempting to do something about that mess that has amassed since you discovered the Internet. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.019 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.019 Problem: ":nbstart" can fail silently. Solution: Give an error when netbeans is not supported by the GUI. (Xavier de Gaye) Files: src/netbeans.c *** ../vim-7.3.018/src/netbeans.c 2010-09-29 17:26:57.000000000 +0200 --- src/netbeans.c 2010-09-29 17:35:37.000000000 +0200 *************** *** 2773,2778 **** --- 2773,2788 ---- ex_nbstart(eap) exarg_T *eap; { + #ifdef FEAT_GUI + # if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \ + && !defined(FEAT_GUI_W32) + if (gui.in_use) + { + EMSG(_("E838: netbeans is not supported with this GUI")); + return; + } + # endif + #endif netbeans_open((char *)eap->arg, FALSE); } *** ../vim-7.3.018/src/version.c 2010-09-29 18:42:25.000000000 +0200 --- src/version.c 2010-09-30 21:02:03.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 19, /**/ -- hundred-and-one symptoms of being an internet addict: 233. You start dreaming about web pages...in html. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.020 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.020 Problem: Cursor position wrong when joining multiple lines and 'formatoptions' contains "a". (Moshe Kamensky) Solution: Adjust cursor position for skipped indent. (Carlo Teubner) Files: src/ops.c, src/testdir/test68.in, src/testdir/test68.ok *** ../vim-7.3.019/src/ops.c 2010-08-15 21:57:28.000000000 +0200 --- src/ops.c 2010-10-09 17:00:35.000000000 +0200 *************** *** 4153,4161 **** int save_undo; { char_u *curr = NULL; char_u *cend; char_u *newp; ! char_u *spaces; /* number of spaces inserte before a line */ int endcurr1 = NUL; int endcurr2 = NUL; int currsize = 0; /* size of the current line */ --- 4153,4162 ---- int save_undo; { char_u *curr = NULL; + char_u *curr_start = NULL; char_u *cend; char_u *newp; ! char_u *spaces; /* number of spaces inserted before a line */ int endcurr1 = NUL; int endcurr2 = NUL; int currsize = 0; /* size of the current line */ *************** *** 4181,4187 **** */ for (t = 0; t < count; ++t) { ! curr = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); if (insert_space && t > 0) { curr = skipwhite(curr); --- 4182,4188 ---- */ for (t = 0; t < count; ++t) { ! curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); if (insert_space && t > 0) { curr = skipwhite(curr); *************** *** 4265,4274 **** copy_spaces(cend, (size_t)(spaces[t])); } mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t, ! (long)(cend - newp + spaces[t])); if (t == 0) break; ! curr = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1)); if (insert_space && t > 1) curr = skipwhite(curr); currsize = (int)STRLEN(curr); --- 4266,4275 ---- copy_spaces(cend, (size_t)(spaces[t])); } mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t, ! (long)(cend - newp + spaces[t] - (curr - curr_start))); if (t == 0) break; ! curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1)); if (insert_space && t > 1) curr = skipwhite(curr); currsize = (int)STRLEN(curr); *** ../vim-7.3.019/src/testdir/test68.in 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/test68.in 2010-10-09 16:53:02.000000000 +0200 *************** *** 51,56 **** --- 51,67 ---- } STARTTEST + /^{/+2 + :set tw& fo=a + I^^ + ENDTEST + + { + 1aa + 2bb + } + + STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/^Results/,$wq! test.out ENDTEST *** ../vim-7.3.019/src/testdir/test68.ok 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/test68.ok 2010-10-09 16:53:02.000000000 +0200 *************** *** 33,35 **** --- 33,38 ---- #a b } + + { 1aa ^^2bb } + *** ../vim-7.3.019/src/version.c 2010-09-30 21:03:13.000000000 +0200 --- src/version.c 2010-10-09 17:05:31.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 20, /**/ -- Did you hear about the new 3 million dollar West Virginia State Lottery? The winner gets 3 dollars a year for a million years. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.021 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.021 Problem: Conflict for defining Boolean in Mac header files. Solution: Define NO_X11_INCLUDES. (Rainer Muller) Files: src/os_macosx.m, src/vim.h *** ../vim-7.3.020/src/os_macosx.m 2010-08-15 21:57:29.000000000 +0200 --- src/os_macosx.m 2010-10-10 17:01:55.000000000 +0200 *************** *** 15,20 **** --- 15,24 ---- Error: MACOS 9 is no longer supported in Vim 7 #endif + /* Avoid a conflict for the definition of Boolean between Mac header files and + * X11 header files. */ + #define NO_X11_INCLUDES + #include "vim.h" #import *** ../vim-7.3.020/src/vim.h 2010-08-15 21:57:29.000000000 +0200 --- src/vim.h 2010-10-10 17:02:56.000000000 +0200 *************** *** 192,199 **** #endif #ifdef NO_X11_INCLUDES ! /* In os_mac_conv.c NO_X11_INCLUDES is defined to avoid X11 headers. ! * Disable all X11 related things to avoid conflicts. */ # ifdef FEAT_X11 # undef FEAT_X11 # endif --- 192,199 ---- #endif #ifdef NO_X11_INCLUDES ! /* In os_mac_conv.c and os_macosx.m NO_X11_INCLUDES is defined to avoid ! * X11 headers. Disable all X11 related things to avoid conflicts. */ # ifdef FEAT_X11 # undef FEAT_X11 # endif *** ../vim-7.3.020/src/version.c 2010-10-09 17:21:42.000000000 +0200 --- src/version.c 2010-10-10 17:05:19.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 21, /**/ -- hundred-and-one symptoms of being an internet addict: 259. When you enter your name in the AltaVista search engine, the top ten matches do indeed refer to you. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.022 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.022 Problem: When opening a new window the 'spellcapcheck' option is cleared. Solution: Copy the correct option value. (Christian Brabandt) Files: src/option.c *** ../vim-7.3.021/src/option.c 2010-08-15 21:57:28.000000000 +0200 --- src/option.c 2010-10-13 13:48:46.000000000 +0200 *************** *** 10011,10017 **** buf->b_p_smc = p_smc; #endif #ifdef FEAT_SPELL ! buf->b_s.b_p_spc = vim_strsave(p_spf); (void)compile_cap_prog(&buf->b_s); buf->b_s.b_p_spf = vim_strsave(p_spf); buf->b_s.b_p_spl = vim_strsave(p_spl); --- 10011,10017 ---- buf->b_p_smc = p_smc; #endif #ifdef FEAT_SPELL ! buf->b_s.b_p_spc = vim_strsave(p_spc); (void)compile_cap_prog(&buf->b_s); buf->b_s.b_p_spf = vim_strsave(p_spf); buf->b_s.b_p_spl = vim_strsave(p_spl); *** ../vim-7.3.021/src/version.c 2010-10-10 17:08:28.000000000 +0200 --- src/version.c 2010-10-13 14:02:08.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 22, /**/ -- GALAHAD: Camelot ... LAUNCELOT: Camelot ... GAWAIN: It's only a model. "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 /// To: vim-dev@vim.org Subject: Patch 7.3.023 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.023 Problem: External program may hang when it tries to write to the tty. Solution: Don't close the slave tty until after the child exits. (Nikola Knezevic) Files: src/os_unix.c *** ../vim-7.3.022/src/os_unix.c 2010-09-21 22:09:28.000000000 +0200 --- src/os_unix.c 2010-10-13 16:17:33.000000000 +0200 *************** *** 4168,4174 **** # ifdef FEAT_GUI if (pty_master_fd >= 0) { - close(pty_slave_fd); /* close slave side of pty */ fromshell_fd = pty_master_fd; toshell_fd = dup(pty_master_fd); } --- 4168,4173 ---- *************** *** 4637,4642 **** --- 4636,4649 ---- break; } + # ifdef FEAT_GUI + /* Close slave side of pty. Only do this after the child has + * exited, otherwise the child may hang when it tries to write on + * the pty. */ + if (pty_master_fd >= 0) + close(pty_slave_fd); + # endif + /* Make sure the child that writes to the external program is * dead. */ if (wpid > 0) *** ../vim-7.3.022/src/version.c 2010-10-13 14:05:29.000000000 +0200 --- src/version.c 2010-10-13 16:20:48.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 23, /**/ -- 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 /// To: vim-dev@vim.org Subject: Patch 7.3.024 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.024 Problem: Named signs do not use a negative number as intended. Solution: Fix the numbering of named signs. (Xavier de Gaye) Files: src/ex_cmds.c *** ../vim-7.3.023/src/ex_cmds.c 2010-09-21 16:56:29.000000000 +0200 --- src/ex_cmds.c 2010-10-13 16:37:18.000000000 +0200 *************** *** 6670,6680 **** sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T)); if (sp == NULL) return; - if (sp_prev == NULL) - first_sign = sp; - else - sp_prev->sn_next = sp; - sp->sn_name = vim_strnsave(arg, (int)(p - arg)); /* If the name is a number use that for the typenr, * otherwise use a negative number. */ --- 6670,6675 ---- *************** *** 6687,6699 **** for (lp = first_sign; lp != NULL; lp = lp->sn_next) { ! if (lp->sn_typenr == last_sign_typenr) { --last_sign_typenr; if (last_sign_typenr == 0) last_sign_typenr = MAX_TYPENR; if (last_sign_typenr == start) { EMSG(_("E612: Too many signs defined")); return; } --- 6682,6695 ---- for (lp = first_sign; lp != NULL; lp = lp->sn_next) { ! if (lp->sn_typenr == -last_sign_typenr) { --last_sign_typenr; if (last_sign_typenr == 0) last_sign_typenr = MAX_TYPENR; if (last_sign_typenr == start) { + vim_free(sp); EMSG(_("E612: Too many signs defined")); return; } *************** *** 6702,6711 **** } } ! sp->sn_typenr = last_sign_typenr--; ! if (last_sign_typenr == 0) last_sign_typenr = MAX_TYPENR; /* wrap around */ } } /* set values for a defined sign. */ --- 6698,6714 ---- } } ! sp->sn_typenr = -last_sign_typenr; ! if (--last_sign_typenr == 0) last_sign_typenr = MAX_TYPENR; /* wrap around */ } + + /* add the new sign to the list of signs */ + if (sp_prev == NULL) + first_sign = sp; + else + sp_prev->sn_next = sp; + sp->sn_name = vim_strnsave(arg, (int)(p - arg)); } /* set values for a defined sign. */ *** ../vim-7.3.023/src/version.c 2010-10-13 16:22:05.000000000 +0200 --- src/version.c 2010-10-13 16:42:14.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 24, /**/ -- 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 /// To: vim-dev@vim.org Subject: Patch 7.3.025 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.025 Problem: ":mksession" does not square brackets escape file name properly. Solution: Improve escapging of file names. (partly by Peter Odding) Files: src/ex_docmd.c *** ../vim-7.3.024/src/ex_docmd.c 2010-09-21 16:56:29.000000000 +0200 --- src/ex_docmd.c 2010-10-13 17:39:17.000000000 +0200 *************** *** 10708,10714 **** * Write a file name to the session file. * Takes care of the "slash" option in 'sessionoptions' and escapes special * characters. ! * Returns FAIL if writing fails. */ static int ses_put_fname(fd, name, flagp) --- 10708,10714 ---- * Write a file name to the session file. * Takes care of the "slash" option in 'sessionoptions' and escapes special * characters. ! * Returns FAIL if writing fails or out of memory. */ static int ses_put_fname(fd, name, flagp) *************** *** 10717,10765 **** unsigned *flagp; { char_u *sname; int retval = OK; - int c; sname = home_replace_save(NULL, name); ! if (sname != NULL) ! name = sname; ! while (*name != NUL) ! { ! #ifdef FEAT_MBYTE ! { ! int l; ! if (has_mbyte && (l = (*mb_ptr2len)(name)) > 1) ! { ! /* copy a multibyte char */ ! while (--l >= 0) ! { ! if (putc(*name, fd) != *name) ! retval = FAIL; ! ++name; ! } ! continue; ! } ! } ! #endif ! c = *name++; ! if (c == '\\' && (*flagp & SSOP_SLASH)) ! /* change a backslash to a forward slash */ ! c = '/'; ! else if ((vim_strchr(escape_chars, c) != NULL ! #ifdef BACKSLASH_IN_FILENAME ! && c != '\\' ! #endif ! ) || c == '#' || c == '%') ! { ! /* escape a special character with a backslash */ ! if (putc('\\', fd) != '\\') ! retval = FAIL; ! } ! if (putc(c, fd) != c) ! retval = FAIL; } vim_free(sname); return retval; } --- 10717,10748 ---- unsigned *flagp; { char_u *sname; + char_u *p; int retval = OK; sname = home_replace_save(NULL, name); ! if (sname == NULL) ! return FAIL; ! if (*flagp & SSOP_SLASH) ! { ! /* change all backslashes to forward slashes */ ! for (p = sname; *p != NUL; mb_ptr_adv(p)) ! if (*p == '\\') ! *p = '/'; } + + /* escapse special characters */ + p = vim_strsave_fnameescape(sname, FALSE); vim_free(sname); + if (p == NULL) + return FAIL; + + /* write the result */ + if (fputs((char *)p, fd) < 0) + retval = FAIL; + + vim_free(p); return retval; } *** ../vim-7.3.024/src/version.c 2010-10-13 16:44:17.000000000 +0200 --- src/version.c 2010-10-13 17:49:15.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 25, /**/ -- "Time flies like an arrow". So I put an arrow on my desk, now awaiting one of these time flies showing up. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.026 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.026 Problem: CTRL-] in a help file doesn't always work. (Tony Mechelynck) Solution: Don't escape special characters. (Carlo Teubner) Files: src/normal.c *** ../vim-7.3.025/src/normal.c 2010-08-15 21:57:28.000000000 +0200 --- src/normal.c 2010-10-13 18:01:03.000000000 +0200 *************** *** 5666,5673 **** else if (cmdchar == '#') aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); else if (tag_cmd) ! /* Don't escape spaces and Tabs in a tag with a backslash */ ! aux_ptr = (char_u *)"\\|\"\n["; else aux_ptr = (char_u *)"\\|\"\n*?["; --- 5666,5678 ---- else if (cmdchar == '#') aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\"); else if (tag_cmd) ! { ! if (curbuf->b_help) ! /* ":help" handles unescaped argument */ ! aux_ptr = (char_u *)""; ! else ! aux_ptr = (char_u *)"\\|\"\n["; ! } else aux_ptr = (char_u *)"\\|\"\n*?["; *** ../vim-7.3.025/src/version.c 2010-10-13 17:50:02.000000000 +0200 --- src/version.c 2010-10-13 18:04:54.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 26, /**/ -- MAN: Fetchez la vache! GUARD: Quoi? MAN: Fetchez la vache! "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 /// To: vim-dev@vim.org Subject: Patch 7.3.027 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.027 Problem: Opening a file on a network share is very slow. Solution: When fixing file name case append "\*" to directory, server and network share names. (David Anderson, John Beckett) Files: src/os_win32.c *** ../vim-7.3.026/src/os_win32.c 2010-09-21 17:29:19.000000000 +0200 --- src/os_win32.c 2010-10-13 20:31:32.000000000 +0200 *************** *** 2308,2319 **** --- 2308,2321 ---- int len) { char szTrueName[_MAX_PATH + 2]; + char szTrueNameTemp[_MAX_PATH + 2]; char *ptrue, *ptruePrev; char *porig, *porigPrev; int flen; WIN32_FIND_DATA fb; HANDLE hFind; int c; + int slen; flen = (int)STRLEN(name); if (flen == 0 || flen > _MAX_PATH) *************** *** 2358,2369 **** } *ptrue = NUL; /* Skip "", "." and "..". */ if (ptrue > ptruePrev && (ptruePrev[0] != '.' || (ptruePrev[1] != NUL && (ptruePrev[1] != '.' || ptruePrev[2] != NUL))) ! && (hFind = FindFirstFile(szTrueName, &fb)) != INVALID_HANDLE_VALUE) { c = *porig; --- 2360,2378 ---- } *ptrue = NUL; + /* To avoid a slow failure append "\*" when searching a directory, + * server or network share. */ + STRCPY(szTrueNameTemp, szTrueName); + slen = strlen(szTrueNameTemp); + if (*porig == psepc && slen + 2 < _MAX_PATH) + STRCPY(szTrueNameTemp + slen, "\\*"); + /* Skip "", "." and "..". */ if (ptrue > ptruePrev && (ptruePrev[0] != '.' || (ptruePrev[1] != NUL && (ptruePrev[1] != '.' || ptruePrev[2] != NUL))) ! && (hFind = FindFirstFile(szTrueNameTemp, &fb)) != INVALID_HANDLE_VALUE) { c = *porig; *** ../vim-7.3.026/src/version.c 2010-10-13 18:06:42.000000000 +0200 --- src/version.c 2010-10-13 20:37:00.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 27, /**/ -- A cow comes flying over the battlements, lowing aggressively. The cow lands on GALAHAD'S PAGE, squashing him completely. "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 /// To: vim-dev@vim.org Subject: Patch 7.3.028 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.028 (after 7.3.024) Problem: Signs don't show up. (Charles Campbell) Solution: Don't use negative numbers. Also assign a number to signs that have a name of all digits to avoid using a sign number twice. Files: src/ex_cmds.c *** ../vim-7.3.027/src/ex_cmds.c 2010-10-13 16:44:17.000000000 +0200 --- src/ex_cmds.c 2010-10-14 20:59:04.000000000 +0200 *************** *** 6569,6575 **** }; static sign_T *first_sign = NULL; ! static int last_sign_typenr = MAX_TYPENR; /* is decremented */ static int sign_cmd_idx __ARGS((char_u *begin_cmd, char_u *end_cmd)); static void sign_list_defined __ARGS((sign_T *sp)); --- 6569,6575 ---- }; static sign_T *first_sign = NULL; ! static int next_sign_typenr = 1; static int sign_cmd_idx __ARGS((char_u *begin_cmd, char_u *end_cmd)); static void sign_list_defined __ARGS((sign_T *sp)); *************** *** 6651,6659 **** --- 6651,6664 ---- EMSG(_("E156: Missing sign name")); else { + /* Isolate the sign name. If it's a number skip leading zeroes, + * so that "099" and "99" are the same sign. But keep "0". */ p = skiptowhite(arg); if (*p != NUL) *p++ = NUL; + while (arg[0] == '0' && arg[1] != NUL) + ++arg; + sp_prev = NULL; for (sp = first_sign; sp != NULL; sp = sp->sn_next) { *************** *** 6666,6706 **** /* ":sign define {name} ...": define a sign */ if (sp == NULL) { /* Allocate a new sign. */ sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T)); if (sp == NULL) return; ! /* If the name is a number use that for the typenr, ! * otherwise use a negative number. */ ! if (VIM_ISDIGIT(*arg)) ! sp->sn_typenr = atoi((char *)arg); ! else { ! sign_T *lp; ! int start = last_sign_typenr; ! ! for (lp = first_sign; lp != NULL; lp = lp->sn_next) { ! if (lp->sn_typenr == -last_sign_typenr) { ! --last_sign_typenr; ! if (last_sign_typenr == 0) ! last_sign_typenr = MAX_TYPENR; ! if (last_sign_typenr == start) ! { ! vim_free(sp); ! EMSG(_("E612: Too many signs defined")); ! return; ! } ! lp = first_sign; ! continue; } } ! sp->sn_typenr = -last_sign_typenr; ! if (--last_sign_typenr == 0) ! last_sign_typenr = MAX_TYPENR; /* wrap around */ } /* add the new sign to the list of signs */ --- 6671,6715 ---- /* ":sign define {name} ...": define a sign */ if (sp == NULL) { + sign_T *lp; + int start = next_sign_typenr; + /* Allocate a new sign. */ sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T)); if (sp == NULL) return; ! /* Check that next_sign_typenr is not already being used. ! * This only happens after wrapping around. Hopefully ! * another one got deleted and we can use its number. */ ! for (lp = first_sign; lp != NULL; ) { ! if (lp->sn_typenr == next_sign_typenr) { ! ++next_sign_typenr; ! if (next_sign_typenr == MAX_TYPENR) ! next_sign_typenr = 1; ! if (next_sign_typenr == start) { ! vim_free(sp); ! EMSG(_("E612: Too many signs defined")); ! return; } + lp = first_sign; /* start all over */ + continue; } + lp = lp->sn_next; + } + + sp->sn_typenr = next_sign_typenr; + if (++next_sign_typenr == MAX_TYPENR) + next_sign_typenr = 1; /* wrap around */ ! sp->sn_name = vim_strsave(arg); ! if (sp->sn_name == NULL) /* out of memory */ ! { ! vim_free(sp); ! return; } /* add the new sign to the list of signs */ *************** *** 6708,6714 **** first_sign = sp; else sp_prev->sn_next = sp; - sp->sn_name = vim_strnsave(arg, (int)(p - arg)); } /* set values for a defined sign. */ --- 6717,6722 ---- *************** *** 6886,6891 **** --- 6894,6901 ---- arg = skiptowhite(arg); if (*arg != NUL) *arg++ = NUL; + while (sign_name[0] == '0' && sign_name[1] != NUL) + ++sign_name; } else if (STRNCMP(arg, "file=", 5) == 0) { *** ../vim-7.3.027/src/version.c 2010-10-13 20:37:37.000000000 +0200 --- src/version.c 2010-10-14 20:50:54.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 28, /**/ -- This is an airconditioned room, do not open Windows. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.029 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.029 Problem: ":sort n" sorts lines without a number as number zero. (Beeyawned) Solution: Make lines without a number sort before lines with a number. Also fix sorting negative numbers. Files: src/ex_cmds.c, src/testdir/test57.in, src/testdir/test57.ok *** ../vim-7.3.028/src/ex_cmds.c 2010-10-14 21:29:31.000000000 +0200 --- src/ex_cmds.c 2010-10-15 20:04:25.000000000 +0200 *************** *** 323,329 **** /* When sorting numbers "start_col_nr" is the number, not the column * number. */ if (sort_nr) ! result = l1.start_col_nr - l2.start_col_nr; else { /* We need to copy one line into "sortbuf1", because there is no --- 323,330 ---- /* When sorting numbers "start_col_nr" is the number, not the column * number. */ if (sort_nr) ! result = l1.start_col_nr == l2.start_col_nr ? 0 ! : l1.start_col_nr > l2.start_col_nr ? 1 : -1; else { /* We need to copy one line into "sortbuf1", because there is no *************** *** 482,488 **** * of the match, by temporarily terminating the string there */ s2 = s + end_col; c = *s2; ! (*s2) = 0; /* Sorting on number: Store the number itself. */ p = s + start_col; if (sort_hex) --- 483,489 ---- * of the match, by temporarily terminating the string there */ s2 = s + end_col; c = *s2; ! *s2 = NUL; /* Sorting on number: Store the number itself. */ p = s + start_col; if (sort_hex) *************** *** 491,499 **** s = skiptodigit(p); if (s > p && s[-1] == '-') --s; /* include preceding negative sign */ ! vim_str2nr(s, NULL, NULL, sort_oct, sort_hex, ! &nrs[lnum - eap->line1].start_col_nr, NULL); ! (*s2) = c; } else { --- 492,504 ---- s = skiptodigit(p); if (s > p && s[-1] == '-') --s; /* include preceding negative sign */ ! if (*s == NUL) ! /* empty line should sort before any number */ ! nrs[lnum - eap->line1].start_col_nr = -MAXLNUM; ! else ! vim_str2nr(s, NULL, NULL, sort_oct, sort_hex, ! &nrs[lnum - eap->line1].start_col_nr, NULL); ! *s2 = c; } else { *************** *** 6556,6563 **** struct sign { sign_T *sn_next; /* next sign in list */ ! int sn_typenr; /* type number of sign (negative if not equal ! to name) */ char_u *sn_name; /* name of sign */ char_u *sn_icon; /* name of pixmap */ #ifdef FEAT_SIGN_ICONS --- 6561,6567 ---- struct sign { sign_T *sn_next; /* next sign in list */ ! int sn_typenr; /* type number of sign */ char_u *sn_name; /* name of sign */ char_u *sn_icon; /* name of pixmap */ #ifdef FEAT_SIGN_ICONS *** ../vim-7.3.028/src/testdir/test57.in 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/test57.in 2010-10-15 20:12:23.000000000 +0200 *************** *** 53,67 **** t02: numeric abc ab - a a321 a123 a122 b321 b123 c123d 123b c321d b322b b321 b321b --- 53,71 ---- t02: numeric abc ab a321 a123 a122 + a + x-22 b321 b123 + c123d + -24 123b c321d + 0 b322b b321 b321b *** ../vim-7.3.028/src/testdir/test57.ok 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/test57.ok 2010-10-15 20:11:42.000000000 +0200 *************** *** 21,26 **** --- 21,30 ---- a + + -24 + x-22 + 0 a122 a123 b123 *** ../vim-7.3.028/src/version.c 2010-10-14 21:29:31.000000000 +0200 --- src/version.c 2010-10-15 20:13:52.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 29, /**/ -- When danger reared its ugly head, He bravely turned his tail and fled Yes, Brave Sir Robin turned about And gallantly he chickened out Bravely taking to his feet He beat a very brave retreat Bravest of the brave Sir Robin Petrified of being dead Soiled his pants then brave Sir Robin Turned away and fled. "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 /// To: vim-dev@vim.org Subject: Patch 7.3.030 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.030 Problem: Cannot store Dict and List in viminfo file. Solution: Add support for this. (Christian Brabandt) Files: runtime/doc/options.txt, src/eval.c, src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, src/testdir/Makefile, src/testdir/main.aap, src/testdir/test74.in, src/testdir/test74.ok *** ../vim-7.3.029/runtime/doc/options.txt 2010-08-15 21:57:17.000000000 +0200 --- runtime/doc/options.txt 2010-10-20 17:41:18.000000000 +0200 *************** *** 7530,7537 **** ! When included, save and restore global variables that start with an uppercase letter, and don't contain a lowercase letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis" ! and "_K_L_M" are not. Only String and Number types are ! stored. " Maximum number of lines saved for each register. Old name of the '<' item, with the disadvantage that you need to put a backslash before the ", otherwise it will be recognized as the --- 7530,7538 ---- ! When included, save and restore global variables that start with an uppercase letter, and don't contain a lowercase letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis" ! and "_K_L_M" are not. Nested List and Dict items may not be ! read back correctly, you end up with a string representation ! instead. " Maximum number of lines saved for each register. Old name of the '<' item, with the disadvantage that you need to put a backslash before the ", otherwise it will be recognized as the *** ../vim-7.3.029/src/eval.c 2010-09-14 12:47:30.000000000 +0200 --- src/eval.c 2010-10-20 16:25:54.000000000 +0200 *************** *** 22520,22537 **** if (tab != NULL) { *tab++ = '\0'; /* isolate the variable name */ ! if (*tab == 'S') /* string var */ ! type = VAR_STRING; #ifdef FEAT_FLOAT ! else if (*tab == 'F') ! type = VAR_FLOAT; #endif tab = vim_strchr(tab, '\t'); if (tab != NULL) { tv.v_type = type; ! if (type == VAR_STRING) tv.vval.v_string = viminfo_readstring(virp, (int)(tab - virp->vir_line + 1), TRUE); #ifdef FEAT_FLOAT --- 22520,22540 ---- if (tab != NULL) { *tab++ = '\0'; /* isolate the variable name */ ! switch (*tab) ! { ! case 'S': type = VAR_STRING; break; #ifdef FEAT_FLOAT ! case 'F': type = VAR_FLOAT; break; #endif + case 'D': type = VAR_DICT; break; + case 'L': type = VAR_LIST; break; + } tab = vim_strchr(tab, '\t'); if (tab != NULL) { tv.v_type = type; ! if (type == VAR_STRING || type == VAR_DICT || type == VAR_LIST) tv.vval.v_string = viminfo_readstring(virp, (int)(tab - virp->vir_line + 1), TRUE); #ifdef FEAT_FLOAT *************** *** 22540,22548 **** #endif else tv.vval.v_number = atol((char *)tab + 1); set_var(virp->vir_line + 1, &tv, FALSE); ! if (type == VAR_STRING) vim_free(tv.vval.v_string); } } } --- 22543,22569 ---- #endif else tv.vval.v_number = atol((char *)tab + 1); + if (type == VAR_DICT || type == VAR_LIST) + { + typval_T *etv = eval_expr(tv.vval.v_string, NULL); + + if (etv == NULL) + /* Failed to parse back the dict or list, use it as a + * string. */ + tv.v_type = VAR_STRING; + else + { + vim_free(tv.vval.v_string); + tv = *etv; + } + } + set_var(virp->vir_line + 1, &tv, FALSE); ! ! if (tv.v_type == VAR_STRING) vim_free(tv.vval.v_string); + else if (tv.v_type == VAR_DICT || tv.v_type == VAR_LIST) + clear_tv(&tv); } } } *************** *** 22584,22591 **** case VAR_STRING: s = "STR"; break; case VAR_NUMBER: s = "NUM"; break; #ifdef FEAT_FLOAT ! case VAR_FLOAT: s = "FLO"; break; #endif default: continue; } fprintf(fp, "!%s\t%s\t", this_var->di_key, s); --- 22605,22614 ---- case VAR_STRING: s = "STR"; break; case VAR_NUMBER: s = "NUM"; break; #ifdef FEAT_FLOAT ! case VAR_FLOAT: s = "FLO"; break; #endif + case VAR_DICT: s = "DIC"; break; + case VAR_LIST: s = "LIS"; break; default: continue; } fprintf(fp, "!%s\t%s\t", this_var->di_key, s); *** ../vim-7.3.029/src/testdir/Make_amiga.mak 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/Make_amiga.mak 2010-10-20 16:27:19.000000000 +0200 *************** *** 27,33 **** test56.out test57.out test58.out test59.out test60.out \ test61.out test62.out test63.out test64.out test65.out \ test66.out test67.out test68.out test69.out test70.out \ ! test71.out test72.out test73.out .SUFFIXES: .in .out --- 27,33 ---- test56.out test57.out test58.out test59.out test60.out \ test61.out test62.out test63.out test64.out test65.out \ test66.out test67.out test68.out test69.out test70.out \ ! test71.out test72.out test73.out test74.out .SUFFIXES: .in .out *************** *** 120,122 **** --- 120,123 ---- test71.out: test71.in test72.out: test72.in test73.out: test73.in + test74.out: test74.in *** ../vim-7.3.029/src/testdir/Make_dos.mak 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/Make_dos.mak 2010-10-20 16:13:35.000000000 +0200 *************** *** 27,33 **** test30.out test31.out test32.out test33.out test34.out \ test37.out test38.out test39.out test40.out test41.out \ test42.out test52.out test65.out test66.out test67.out \ ! test68.out test69.out test71.out test72.out test73.out SCRIPTS32 = test50.out test70.out --- 27,34 ---- test30.out test31.out test32.out test33.out test34.out \ test37.out test38.out test39.out test40.out test41.out \ test42.out test52.out test65.out test66.out test67.out \ ! test68.out test69.out test71.out test72.out test73.out \ ! test74.out SCRIPTS32 = test50.out test70.out *** ../vim-7.3.029/src/testdir/Make_ming.mak 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/Make_ming.mak 2010-10-20 16:26:54.000000000 +0200 *************** *** 47,53 **** test30.out test31.out test32.out test33.out test34.out \ test37.out test38.out test39.out test40.out test41.out \ test42.out test52.out test65.out test66.out test67.out \ ! test68.out test69.out test71.out test72.out test72.out SCRIPTS32 = test50.out test70.out --- 47,54 ---- test30.out test31.out test32.out test33.out test34.out \ test37.out test38.out test39.out test40.out test41.out \ test42.out test52.out test65.out test66.out test67.out \ ! test68.out test69.out test71.out test72.out test73.out \ ! test74.out SCRIPTS32 = test50.out test70.out *** ../vim-7.3.029/src/testdir/Make_os2.mak 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/Make_os2.mak 2010-10-20 16:13:35.000000000 +0200 *************** *** 27,33 **** test56.out test57.out test58.out test59.out test60.out \ test61.out test62.out test63.out test64.out test65.out \ test66.out test67.out test68.out test69.out test70.out \ ! test71.out test72.out test73.out .SUFFIXES: .in .out --- 27,33 ---- test56.out test57.out test58.out test59.out test60.out \ test61.out test62.out test63.out test64.out test65.out \ test66.out test67.out test68.out test69.out test70.out \ ! test71.out test72.out test73.out test74.out .SUFFIXES: .in .out *** ../vim-7.3.029/src/testdir/Make_vms.mms 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/Make_vms.mms 2010-10-20 16:13:35.000000000 +0200 *************** *** 74,80 **** test56.out test57.out test60.out \ test61.out test62.out test63.out test64.out test65.out \ test66.out test67.out test68.out test69.out \ ! test71.out test72.out # Known problems: # Test 30: a problem around mac format - unknown reason --- 74,80 ---- test56.out test57.out test60.out \ test61.out test62.out test63.out test64.out test65.out \ test66.out test67.out test68.out test69.out \ ! test71.out test72.out test74.out # Known problems: # Test 30: a problem around mac format - unknown reason *** ../vim-7.3.029/src/testdir/Makefile 2010-09-14 12:47:30.000000000 +0200 --- src/testdir/Makefile 2010-10-20 16:13:35.000000000 +0200 *************** *** 10,15 **** --- 10,16 ---- # This will make testing about 10 times as slow. # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=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 \ *************** *** 23,29 **** test54.out test55.out test56.out test57.out test58.out \ test59.out test60.out test61.out test62.out test63.out \ test64.out test65.out test66.out test67.out test68.out \ ! test69.out test70.out test71.out test72.out test73.out SCRIPTS_GUI = test16.out --- 24,31 ---- test54.out test55.out test56.out test57.out test58.out \ test59.out test60.out test61.out test62.out test63.out \ test64.out test65.out test66.out test67.out test68.out \ ! test69.out test70.out test71.out test72.out test73.out \ ! test74.out SCRIPTS_GUI = test16.out *** ../vim-7.3.029/src/testdir/main.aap 2010-08-15 21:57:29.000000000 +0200 --- src/testdir/main.aap 2010-10-20 16:13:35.000000000 +0200 *************** *** 13,19 **** test33.out test34.out test35.out test36.out test37.out test38.out test39.out test40.out test41.out test42.out test43.out test44.out test45.out test46.out test47.out ! test48.out test49.out ScriptsGUI = test16.out --- 13,19 ---- test33.out test34.out test35.out test36.out test37.out test38.out test39.out test40.out test41.out test42.out test43.out test44.out test45.out test46.out test47.out ! test48.out test49.out test74.out ScriptsGUI = test16.out *** ../vim-7.3.029/src/testdir/test74.in 2010-10-20 17:41:30.000000000 +0200 --- src/testdir/test74.in 2010-10-20 17:37:52.000000000 +0200 *************** *** 0 **** --- 1,36 ---- + " Tests for storing global variables in the .viminfo file vim: set ft=vim: + + STARTTEST + :so small.vim + :" Do all test in a separate window to avoid E211 when we recursively + :" delete the Xfind directory during cleanup + :" + :" This will cause a few errors, do it silently. + :set visualbell + :set nocp viminfo+=!,nviminfo + :let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000} + :" store a really long list, so line wrapping will occur in viminfo file + :let MY_GLOBAL_LIST=range(1,100) + :wv! Xviminfo + :unlet MY_GLOBAL_DICT + :unlet MY_GLOBAL_LIST + :rv! Xviminfo + :call delete('Xviminfo') + :if exists("MY_GLOBAL_DICT") + :redir >> test.out + :echo MY_GLOBAL_DICT + :redir end + :endif + :if exists("MY_GLOBAL_LIST") + :redir >> test.out + :echo MY_GLOBAL_LIST + :redir end + :endif + :redir >> test.out + :echo "foobar" + :redir end + :endif + :qa! + ENDTEST + + eof *** ../vim-7.3.029/src/testdir/test74.ok 2010-10-20 17:41:30.000000000 +0200 --- src/testdir/test74.ok 2010-10-20 17:36:57.000000000 +0200 *************** *** 0 **** --- 1,5 ---- + + {'foo': 1, 'longvarible': 1000, 'bar': 0} + [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100] + + foobar *** ../vim-7.3.029/src/version.c 2010-10-15 20:20:00.000000000 +0200 --- src/version.c 2010-10-20 17:23:54.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 30, /**/ -- 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 /// To: vim-dev@vim.org Subject: Patch 7.3.031 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.031 Problem: Can't pass the X window ID to another application. Solution: Add v:windowid. (Christian J. Robinson, Lech Lorens) Files: runtime/doc/eval.txt, src/eval.c, src/gui.c, src/vim.h, src/os_unix.c *** ../vim-7.3.030/runtime/doc/eval.txt 2010-08-15 21:57:15.000000000 +0200 --- runtime/doc/eval.txt 2010-10-20 19:11:03.000000000 +0200 *************** *** 1657,1662 **** --- 1657,1667 ---- *v:warningmsg* *warningmsg-variable* v:warningmsg Last given warning message. It's allowed to set this variable. + *v:windowid* *windowid-variable* + v:windowid When any X11 based GUI is running or when running in a + terminal and Vim connects to the X server (|-X|) this will be + set to the window ID. Otherwise the value is zero. + ============================================================================== 4. Builtin Functions *functions* *** ../vim-7.3.030/src/eval.c 2010-10-20 17:44:01.000000000 +0200 --- src/eval.c 2010-10-20 18:48:40.000000000 +0200 *************** *** 362,367 **** --- 362,368 ---- {VV_NAME("operator", VAR_STRING), VV_RO}, {VV_NAME("searchforward", VAR_NUMBER), 0}, {VV_NAME("oldfiles", VAR_LIST), 0}, + {VV_NAME("windowid", VAR_NUMBER), VV_RO}, }; /* shorthand */ *** ../vim-7.3.030/src/gui.c 2010-09-29 17:26:57.000000000 +0200 --- src/gui.c 2010-10-20 19:15:56.000000000 +0200 *************** *** 105,112 **** --- 105,122 ---- #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) if (gui.in_use) + { + # ifdef FEAT_EVAL + Window x11_window; + Display *x11_display; + + if (gui_get_x11_windis(&x11_window, &x11_display) == OK) + set_vim_var_nr(VV_WINDOWID, (long)x11_window); + # endif + /* Display error messages in a dialog now. */ display_errors(); + } #endif #if defined(MAY_FORK) && !defined(__QNXNTO__) *** ../vim-7.3.030/src/vim.h 2010-10-10 17:08:28.000000000 +0200 --- src/vim.h 2010-10-20 18:48:40.000000000 +0200 *************** *** 1842,1848 **** #define VV_OP 52 #define VV_SEARCHFORWARD 53 #define VV_OLDFILES 54 ! #define VV_LEN 55 /* number of v: vars */ #ifdef FEAT_CLIPBOARD --- 1842,1849 ---- #define VV_OP 52 #define VV_SEARCHFORWARD 53 #define VV_OLDFILES 54 ! #define VV_WINDOWID 55 ! #define VV_LEN 56 /* number of v: vars */ #ifdef FEAT_CLIPBOARD *** ../vim-7.3.030/src/os_unix.c 2010-10-13 16:22:05.000000000 +0200 --- src/os_unix.c 2010-10-20 19:15:46.000000000 +0200 *************** *** 1738,1743 **** --- 1738,1748 ---- } if (x11_window == 0 || x11_display == NULL) return (result = FAIL); + + # ifdef FEAT_EVAL + set_vim_var_nr(VV_WINDOWID, (long)x11_window); + # endif + return (result = OK); } *** ../vim-7.3.030/src/version.c 2010-10-20 17:44:01.000000000 +0200 --- src/version.c 2010-10-20 19:11:31.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 31, /**/ -- What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' meaning 'bloodsucking creatures'. /// 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 /// To: vim-dev@vim.org Subject: Patch 7.3.032 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.032 Problem: maparg() doesn't return the flags, such as ,