Hello community,
here is the log from the commit of package vim for openSUSE:Factory checked in at 2013-10-21 15:16:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vim (Old)
and /work/SRC/openSUSE:Factory/.vim.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vim"
Changes:
--------
--- /work/SRC/openSUSE:Factory/vim/vim.changes 2013-10-01 08:35:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.vim.new/vim.changes 2013-10-21 15:16:33.000000000 +0200
@@ -1,0 +2,16 @@
+Mon Oct 21 10:47:39 UTC 2013 - idonmez@suse.com
+
+- Updated to revision 052, fixes the following problems
+ * Can't use Tcl 8.6.
+ * When using input() in a function invoked by a mapping it doesn't
+ work.
+ * Recent clang version complains about -fno-strength-reduce.
+ * In Ex mode, when line numbers are enabled the substitute prompt is
+ wrong.
+ * "gn" selects too much for the pattern "\d" when there are two
+ lines with a single digit. (Ryan Carney)
+ * Syntax highlighting a Yaml file causes a crash. (Blake Preston)
+ * With 'fo' set to "a2" inserting a space in the first column may
+ cause the cursor to jump to the previous line.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ vim.spec ++++++
--- /var/tmp/diff_new_pack.czcOKA/_old 2013-10-21 15:16:34.000000000 +0200
+++ /var/tmp/diff_new_pack.czcOKA/_new 2013-10-21 15:16:34.000000000 +0200
@@ -17,7 +17,7 @@
%define pkg_version 7.4
-%define official_ptchlvl 045
+%define official_ptchlvl 052
%define VIM_SUBDIR vim74
%define site_runtimepath /usr/share/vim/site
%define make make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/current MAKE="make -e" %{?_smp_mflags}
++++++ vim-7.4-patches.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.046 new/vim-7.4-patches/7.4.046
--- old/vim-7.4-patches/7.4.046 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.046 2013-10-02 14:28:03.000000000 +0200
@@ -0,0 +1,80 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.046
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.046
+Problem: Can't use Tcl 8.6.
+Solution: Change how Tcl_FindExecutable is called. (Jan Nijtmans)
+Files: src/if_tcl.c
+
+
+*** ../vim-7.4.045/src/if_tcl.c 2013-08-02 19:31:15.000000000 +0200
+--- src/if_tcl.c 2013-10-02 13:44:48.000000000 +0200
+***************
+*** 165,170 ****
+--- 165,171 ----
+ */
+ static HANDLE hTclLib = NULL;
+ Tcl_Interp* (*dll_Tcl_CreateInterp)();
++ void (*dll_Tcl_FindExecutable)(const void *);
+
+ /*
+ * Table of name to function pointer of tcl.
+***************
+*** 175,180 ****
+--- 176,182 ----
+ TCL_PROC* ptr;
+ } tcl_funcname_table[] = {
+ {"Tcl_CreateInterp", (TCL_PROC*)&dll_Tcl_CreateInterp},
++ {"Tcl_FindExecutable", (TCL_PROC*)&dll_Tcl_FindExecutable},
+ {NULL, NULL},
+ };
+
+***************
+*** 248,258 ****
+ {
+ Tcl_Interp *interp;
+
+ if (interp = dll_Tcl_CreateInterp())
+ {
+ if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0))
+ {
+- Tcl_FindExecutable(find_executable_arg);
+ Tcl_DeleteInterp(interp);
+ stubs_initialized = TRUE;
+ }
+--- 250,261 ----
+ {
+ Tcl_Interp *interp;
+
++ dll_Tcl_FindExecutable(find_executable_arg);
++
+ if (interp = dll_Tcl_CreateInterp())
+ {
+ if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0))
+ {
+ Tcl_DeleteInterp(interp);
+ stubs_initialized = TRUE;
+ }
+*** ../vim-7.4.045/src/version.c 2013-09-29 21:11:00.000000000 +0200
+--- src/version.c 2013-10-02 13:46:47.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 46,
+ /**/
+
+--
+Not too long ago, a program was something you watched on TV...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.047 new/vim-7.4-patches/7.4.047
--- old/vim-7.4-patches/7.4.047 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.047 2013-10-02 16:47:27.000000000 +0200
@@ -0,0 +1,56 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.047
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.047
+Problem: When using input() in a function invoked by a mapping it doesn't
+ work.
+Solution: Temporarily reset ex_normal_busy. (Yasuhiro Matsumoto)
+Files: src/eval.c
+
+
+*** ../vim-7.4.046/src/eval.c 2013-09-29 21:11:00.000000000 +0200
+--- src/eval.c 2013-10-02 16:40:52.000000000 +0200
+***************
+*** 13054,13062 ****
+--- 13054,13071 ----
+ }
+
+ if (defstr != NULL)
++ {
++ # ifdef FEAT_EX_EXTRA
++ int save_ex_normal_busy = ex_normal_busy;
++ ex_normal_busy = 0;
++ # endif
+ rettv->vval.v_string =
+ getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr,
+ xp_type, xp_arg);
++ # ifdef FEAT_EX_EXTRA
++ ex_normal_busy = save_ex_normal_busy;
++ # endif
++ }
+ if (inputdialog && rettv->vval.v_string == NULL
+ && argvars[1].v_type != VAR_UNKNOWN
+ && argvars[2].v_type != VAR_UNKNOWN)
+*** ../vim-7.4.046/src/version.c 2013-10-02 14:25:39.000000000 +0200
+--- src/version.c 2013-10-02 16:45:45.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 47,
+ /**/
+
+--
+Not too long ago, a keyboard was something to make music with...
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.048 new/vim-7.4-patches/7.4.048
--- old/vim-7.4-patches/7.4.048 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.048 2013-10-02 18:23:38.000000000 +0200
@@ -0,0 +1,96 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.048
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.048
+Problem: Recent clang version complains about -fno-strength-reduce.
+Solution: Add a configure check for the clang version. (Kazunobu Kuriyama)
+Files: src/configure.in, src/auto/configure
+
+
+*** ../vim-7.4.047/src/configure.in 2013-08-04 20:00:50.000000000 +0200
+--- src/configure.in 2013-10-02 17:56:25.000000000 +0200
+***************
+*** 62,67 ****
+--- 62,90 ----
+ fi
+ fi
+
++ dnl clang-500.2.75 or around has abandoned -f[no-]strength-reduce and issues a
++ dnl warning when that flag is passed to. Accordingly, adjust CFLAGS based on
++ dnl the version number of the clang in use.
++ dnl Note that this does not work to get the version of clang 3.1 or 3.2.
++ AC_MSG_CHECKING(for recent clang version)
++ CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$/\1/p'`
++ if test x"$CLANG_VERSION_STRING" != x"" ; then
++ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*/\1/p'`
++ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/p'`
++ CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)/\1/p'`
++ CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
++ AC_MSG_RESULT($CLANG_VERSION)
++ dnl If you find the same issue with versions earlier than 500.2.75,
++ dnl change the constant 500002075 below appropriately. To get the
++ dnl integer corresponding to a version number, refer to the
++ dnl definition of CLANG_VERSION above.
++ if test "$CLANG_VERSION" -ge 500002075 ; then
++ CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'`
++ fi
++ else
++ AC_MSG_RESULT(no)
++ fi
++
+ dnl If configure thinks we are cross compiling, there might be something
+ dnl wrong with the CC or CFLAGS settings, give a useful warning message
+ if test "$cross_compiling" = yes; then
+*** ../vim-7.4.047/src/auto/configure 2013-08-04 20:01:06.000000000 +0200
+--- src/auto/configure 2013-10-02 17:56:52.000000000 +0200
+***************
+*** 3989,3994 ****
+--- 3989,4012 ----
+ fi
+ fi
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5
++ $as_echo_n "checking for recent clang version... " >&6; }
++ CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
++ if test x"$CLANG_VERSION_STRING" != x"" ; then
++ CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
++ CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
++ CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
++ CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
++ $as_echo "$CLANG_VERSION" >&6; }
++ if test "$CLANG_VERSION" -ge 500002075 ; then
++ CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'`
++ fi
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++ $as_echo "no" >&6; }
++ fi
++
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
+ $as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
+*** ../vim-7.4.047/src/version.c 2013-10-02 16:46:23.000000000 +0200
+--- src/version.c 2013-10-02 17:19:31.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 48,
+ /**/
+
+--
+I have to exercise early in the morning before my brain
+figures out what I'm doing.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.049 new/vim-7.4-patches/7.4.049
--- old/vim-7.4-patches/7.4.049 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.049 2013-10-02 18:44:26.000000000 +0200
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.049
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.049
+Problem: In Ex mode, when line numbers are enabled the substitute prompt is
+ wrong.
+Solution: Adjust for the line number size. (Benoit Pierre)
+Files: src/ex_cmds.c
+
+
+*** ../vim-7.4.048/src/ex_cmds.c 2013-08-07 15:15:51.000000000 +0200
+--- src/ex_cmds.c 2013-10-02 18:31:24.000000000 +0200
+***************
+*** 4740,4750 ****
+ char_u *resp;
+ colnr_T sc, ec;
+
+! print_line_no_prefix(lnum, FALSE, FALSE);
+
+ getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
+ curwin->w_cursor.col = regmatch.endpos[0].col - 1;
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
+ msg_start();
+ for (i = 0; i < (long)sc; ++i)
+ msg_putchar(' ');
+--- 4740,4756 ----
+ char_u *resp;
+ colnr_T sc, ec;
+
+! print_line_no_prefix(lnum, do_number, do_list);
+
+ getvcol(curwin, &curwin->w_cursor, &sc, NULL, NULL);
+ curwin->w_cursor.col = regmatch.endpos[0].col - 1;
+ getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec);
++ if (do_number || curwin->w_p_nu)
++ {
++ int numw = number_width(curwin) + 1;
++ sc += numw;
++ ec += numw;
++ }
+ msg_start();
+ for (i = 0; i < (long)sc; ++i)
+ msg_putchar(' ');
+*** ../vim-7.4.048/src/version.c 2013-10-02 18:22:58.000000000 +0200
+--- src/version.c 2013-10-02 18:33:22.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 49,
+ /**/
+
+--
+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/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.050 new/vim-7.4-patches/7.4.050
--- old/vim-7.4-patches/7.4.050 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.050 2013-10-02 21:56:41.000000000 +0200
@@ -0,0 +1,90 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.050
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.050
+Problem: "gn" selects too much for the pattern "\d" when there are two
+ lines with a single digit. (Ryan Carney)
+Solution: Adjust the logic of is_one_char(). (Christian Brabandt)
+Files: src/search.c, src/testdir/test53.in, src/testdir/test53.ok
+
+
+*** ../vim-7.4.049/src/search.c 2013-08-14 17:45:25.000000000 +0200
+--- src/search.c 2013-10-02 21:49:40.000000000 +0200
+***************
+*** 4680,4687 ****
+ && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
+ && regmatch.startpos[0].col == regmatch.endpos[0].col);
+
+! if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col)
+! result = TRUE;
+ }
+
+ called_emsg |= save_called_emsg;
+--- 4680,4687 ----
+ && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
+ && regmatch.startpos[0].col == regmatch.endpos[0].col);
+
+! if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col)
+! result = TRUE;
+ }
+
+ called_emsg |= save_called_emsg;
+*** ../vim-7.4.049/src/testdir/test53.in 2013-06-30 14:31:56.000000000 +0200
+--- src/testdir/test53.in 2013-10-02 21:47:10.000000000 +0200
+***************
+*** 46,51 ****
+--- 46,54 ----
+ :set selection=exclusive
+ $cgNmongoose/i
+ cgnj
++ :" Make sure there is no other match y uppercase.
++ /x59
++ gggnd
+ :/^start:/,/^end:/wq! test.out
+ ENDTEST
+
+***************
+*** 75,78 ****
+--- 78,84 ----
+ uniquepattern uniquepattern
+ my very excellent mother just served us nachos
+ for (i=0; i<=10; i++)
++ Y
++ text
++ Y
+ end:
+*** ../vim-7.4.049/src/testdir/test53.ok 2013-06-30 14:31:56.000000000 +0200
+--- src/testdir/test53.ok 2013-10-02 21:47:34.000000000 +0200
+***************
+*** 27,30 ****
+--- 27,33 ----
+ uniquepattern
+ my very excellent mongoose just served us nachos
+ for (j=0; i<=10; i++)
++
++ text
++ Y
+ end:
+*** ../vim-7.4.049/src/version.c 2013-10-02 18:43:00.000000000 +0200
+--- src/version.c 2013-10-02 21:51:34.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 50,
+ /**/
+
+--
+Why doesn't Tarzan have a beard?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.051 new/vim-7.4-patches/7.4.051
--- old/vim-7.4-patches/7.4.051 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.051 2013-10-06 15:47:14.000000000 +0200
@@ -0,0 +1,67 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.051
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.051
+Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston)
+Solution: Copy the pim structure before calling addstate() to avoid it
+ becoming invalide when the state list is reallocated.
+Files: src/regexp_nfa.c
+
+
+*** ../vim-7.4.050/src/regexp_nfa.c 2013-09-25 18:16:34.000000000 +0200
+--- src/regexp_nfa.c 2013-10-06 15:44:31.000000000 +0200
+***************
+*** 6458,6463 ****
+--- 6458,6464 ----
+ if (add_state != NULL)
+ {
+ nfa_pim_T *pim;
++ nfa_pim_T pim_copy;
+
+ if (t->pim.result == NFA_PIM_UNUSED)
+ pim = NULL;
+***************
+*** 6531,6536 ****
+--- 6532,6546 ----
+ pim = NULL;
+ }
+
++ /* If "pim" points into l->t it will become invalid when
++ * adding the state causes the list to be reallocated. Make a
++ * local copy to avoid that. */
++ if (pim == &t->pim)
++ {
++ copy_pim(&pim_copy, pim);
++ pim = &pim_copy;
++ }
++
+ if (add_here)
+ addstate_here(thislist, add_state, &t->subs, pim, &listidx);
+ else
+*** ../vim-7.4.050/src/version.c 2013-10-02 21:54:57.000000000 +0200
+--- src/version.c 2013-10-06 15:21:16.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 51,
+ /**/
+
+--
+GUARD #2: It could be carried by an African swallow!
+GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
+ that's my point.
+GUARD #2: Oh, yeah, I agree with that...
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vim-7.4-patches/7.4.052 new/vim-7.4-patches/7.4.052
--- old/vim-7.4-patches/7.4.052 1970-01-01 01:00:00.000000000 +0100
+++ new/vim-7.4-patches/7.4.052 2013-10-06 17:47:47.000000000 +0200
@@ -0,0 +1,197 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.4.052
+Fcc: outbox
+From: Bram Moolenaar
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.4.052
+Problem: With 'fo' set to "a2" inserting a space in the first column may
+ cause the cursor to jump to the previous line.
+Solution: Handle the case when there is no comment leader properly. (Tor
+ Perkins) Also fix that cursor is in the wrong place when spaces
+ get replaced with a Tab.
+Files: src/misc1.c, src/ops.c, src/testdir/test68.in,
+ src/testdir/test68.ok
+
+
+*** ../vim-7.4.051/src/misc1.c 2013-09-05 21:41:35.000000000 +0200
+--- src/misc1.c 2013-10-06 17:46:18.000000000 +0200
+***************
+*** 303,312 ****
+ ml_replace(curwin->w_cursor.lnum, newline, FALSE);
+ if (flags & SIN_CHANGED)
+ changed_bytes(curwin->w_cursor.lnum, 0);
+! /* Correct saved cursor position if it's after the indent. */
+! if (saved_cursor.lnum == curwin->w_cursor.lnum
+! && saved_cursor.col >= (colnr_T)(p - oldline))
+! saved_cursor.col += ind_len - (colnr_T)(p - oldline);
+ retval = TRUE;
+ }
+ else
+--- 303,320 ----
+ ml_replace(curwin->w_cursor.lnum, newline, FALSE);
+ if (flags & SIN_CHANGED)
+ changed_bytes(curwin->w_cursor.lnum, 0);
+! /* Correct saved cursor position if it is in this line. */
+! if (saved_cursor.lnum == curwin->w_cursor.lnum)
+! {
+! if (saved_cursor.col >= (colnr_T)(p - oldline))
+! /* cursor was after the indent, adjust for the number of
+! * bytes added/removed */
+! saved_cursor.col += ind_len - (colnr_T)(p - oldline);
+! else if (saved_cursor.col >= (colnr_T)(s - newline))
+! /* cursor was in the indent, and is now after it, put it back
+! * at the start of the indent (replacing spaces with TAB) */
+! saved_cursor.col = (colnr_T)(s - newline);
+! }
+ retval = TRUE;
+ }
+ else
+***************
+*** 1581,1589 ****
+
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ /*
+! * get_leader_len() returns the length of the prefix of the given string
+! * which introduces a comment. If this string is not a comment then 0 is
+! * returned.
+ * When "flags" is not NULL, it is set to point to the flags of the recognized
+ * comment leader.
+ * "backward" must be true for the "O" command.
+--- 1589,1597 ----
+
+ #if defined(FEAT_COMMENTS) || defined(PROTO)
+ /*
+! * get_leader_len() returns the length in bytes of the prefix of the given
+! * string which introduces a comment. If this string is not a comment then
+! * 0 is returned.
+ * When "flags" is not NULL, it is set to point to the flags of the recognized
+ * comment leader.
+ * "backward" must be true for the "O" command.
+*** ../vim-7.4.051/src/ops.c 2013-09-25 23:24:54.000000000 +0200
+--- src/ops.c 2013-10-06 17:11:51.000000000 +0200
+***************
+*** 4989,4995 ****
+
+ /*
+ * When still in same paragraph, join the lines together. But
+! * first delete the comment leader from the second line.
+ */
+ if (!is_end_par)
+ {
+--- 4989,4995 ----
+
+ /*
+ * When still in same paragraph, join the lines together. But
+! * first delete the leader from the second line.
+ */
+ if (!is_end_par)
+ {
+***************
+*** 4999,5009 ****
+ if (line_count < 0 && u_save_cursor() == FAIL)
+ break;
+ #ifdef FEAT_COMMENTS
+- (void)del_bytes((long)next_leader_len, FALSE, FALSE);
+ if (next_leader_len > 0)
+ mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
+ (long)-next_leader_len);
+ #endif
+ curwin->w_cursor.lnum--;
+ if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+ {
+--- 4999,5023 ----
+ if (line_count < 0 && u_save_cursor() == FAIL)
+ break;
+ #ifdef FEAT_COMMENTS
+ if (next_leader_len > 0)
++ {
++ (void)del_bytes((long)next_leader_len, FALSE, FALSE);
+ mark_col_adjust(curwin->w_cursor.lnum, (colnr_T)0, 0L,
+ (long)-next_leader_len);
++ } else
+ #endif
++ if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
++ {
++ char_u *p = ml_get_curline();
++ int indent = skipwhite(p) - p;
++
++ if (indent > 0)
++ {
++ (void)del_bytes(indent, FALSE, FALSE);
++ mark_col_adjust(curwin->w_cursor.lnum,
++ (colnr_T)0, 0L, (long)-indent);
++ }
++ }
+ curwin->w_cursor.lnum--;
+ if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+ {
+*** ../vim-7.4.051/src/testdir/test68.in 2012-07-25 15:57:06.000000000 +0200
+--- src/testdir/test68.in 2013-10-06 16:20:33.000000000 +0200
+***************
+*** 62,67 ****
+--- 62,81 ----
+ }
+
+ STARTTEST
++ /^{/+3
++ :set tw=5 fo=t2a si
++ i A_
++ ENDTEST
++
++ {
++
++ x a
++ b
++ c
++
++ }
++
++ STARTTEST
+ /^{/+1
+ :set tw=5 fo=qn comments=:#
+ gwap
+*** ../vim-7.4.051/src/testdir/test68.ok 2012-07-25 16:03:05.000000000 +0200
+--- src/testdir/test68.ok 2013-10-06 16:20:33.000000000 +0200
+***************
+*** 43,48 ****
+--- 43,57 ----
+
+
+ {
++
++ x a
++ b_
++ c
++
++ }
++
++
++ {
+ # 1 a
+ # b
+ }
+*** ../vim-7.4.051/src/version.c 2013-10-06 15:46:06.000000000 +0200
+--- src/version.c 2013-10-06 17:25:27.000000000 +0200
+***************
+*** 740,741 ****
+--- 740,743 ----
+ { /* Add new patch number below this line */
++ /**/
++ 52,
+ /**/
+
+--
+ARTHUR: Will you ask your master if he wants to join my court at Camelot?!
+GUARD #1: But then of course African swallows are not migratory.
+GUARD #2: Oh, yeah...
+GUARD #1: So they couldn't bring a coconut back anyway...
+ The Quest for the Holy Grail (Monty Python)
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ an exciting new programming language -- http://www.Zimbu.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///